This functionality is available as an in-tree module in GNU Radio versions 3.10 and higher (TBD also in a future 3.9 release).
SoapySDR is the driver subsystem in the Pothosware ecosystem. It provides a specification for drivers, and a management layer required to use them. Individual drivers are dynamically linked, so they can be maintained independently of the SoapySDR user (GNU Radio in this case).
The gr-soapy module wraps SoapySDR, allowing it to be used in GNU Radio. The original version was developed by Libre Space Foundation. Note that the in-tree version provided with GNU Radio performs the same function as the Libre Space version, but the code has been revamped and is not API compatible. It should straightforward to port existing applications.
Your Python or C++ application, or one generated by GRC, uses the gr-soapy module built into GNU Radio. It specifies the name of the driver and a set of driver, stream and other option parameters. At runtime, some parameters (e.g., frequency, gains) can be adjusted via setters.
GNU Radio gr-soapy
The SoapySDR "wrapper" module built into GNU Radio, providing the soapy::source and soapy::sink blocks. These blocks are usable from Python or C++. If an recent enough version of SoapySDR is available on the build system when GNU Radio is configured, this module will be included by default.
A specification and driver management layer, not part of GNU Radio. This package is SoapySDR-devel on RPM-based systems, or libsoapysdr-dev on DEB-based systems. It is also easy to build and install manually, and has a PyBOMBS recipe. See section on versions below.
Individual SoapySDR drivers, not part of GNU Radio, are dynamically loaded modules, one for each type of hardware. These modules are typically built upon a vendor-supplied hardware support library. For example, SoapyRTLSDR. These modules are available from distro repos, or can be built manually. Many have PyBOMBS recipes.
Hardware Support Library
A vendor or other developer provides the low-level package required to talk directly to hardware. For example, the rtl-sdr library. These libraries are usually in distro or vendor repos. Many have PyBOMBS recipes.
This stack is hardware-independent from the GNU Radio point of view. However, it is helpful to have blocks that are easily usable in GRC. "One Block to Rule Them All" Source and Sink blocks are provided currently, and contain a lot of hardware-specific information. Some hardware-specific GRC blocks will be developed in the future, and users can, of course, create their own. This is the one area where hardware specifics need to be maintained in the GNU Radio code. Fortunately, this is done in block YAML files, which are (mostly) independent of GNU Radio version.
Currently, SoapySDR 0.7.2 or higher is required. Note that Ubuntu 18.04 and Debian 10 provide an older version. Recent Ubuntu and Fedora releases provide a new enough version.