summary refs log tree commit diff
path: root/pkgs/applications/radio
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/radio')
-rw-r--r--pkgs/applications/radio/cubicsdr/default.nix2
-rw-r--r--pkgs/applications/radio/direwolf/default.nix4
-rw-r--r--pkgs/applications/radio/dsd/default.nix2
-rw-r--r--pkgs/applications/radio/fldigi/default.nix8
-rw-r--r--pkgs/applications/radio/fllog/default.nix9
-rw-r--r--pkgs/applications/radio/flmsg/default.nix9
-rw-r--r--pkgs/applications/radio/flrig/default.nix9
-rw-r--r--pkgs/applications/radio/flwrap/default.nix9
-rw-r--r--pkgs/applications/radio/gnuradio/3.7.nix17
-rw-r--r--pkgs/applications/radio/gnuradio/ais.nix2
-rw-r--r--pkgs/applications/radio/gnuradio/default.nix13
-rw-r--r--pkgs/applications/radio/gnuradio/gsm.nix2
-rw-r--r--pkgs/applications/radio/gnuradio/limesdr.nix4
-rw-r--r--pkgs/applications/radio/gnuradio/nacl.nix2
-rw-r--r--pkgs/applications/radio/gnuradio/osmosdr.nix4
-rw-r--r--pkgs/applications/radio/gnuradio/rds.nix2
-rw-r--r--pkgs/applications/radio/gnuradio/shared.nix6
-rw-r--r--pkgs/applications/radio/gnuradio/wrapper.nix29
-rw-r--r--pkgs/applications/radio/gqrx/default.nix2
-rw-r--r--pkgs/applications/radio/minimodem/default.nix8
-rw-r--r--pkgs/applications/radio/qsstv/default.nix4
-rw-r--r--pkgs/applications/radio/rtl-sdr/default.nix2
-rw-r--r--pkgs/applications/radio/uhd/default.nix4
23 files changed, 79 insertions, 74 deletions
diff --git a/pkgs/applications/radio/cubicsdr/default.nix b/pkgs/applications/radio/cubicsdr/default.nix
index d3b5b12836f..8ba372e46fb 100644
--- a/pkgs/applications/radio/cubicsdr/default.nix
+++ b/pkgs/applications/radio/cubicsdr/default.nix
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ fftw hamlib libpulseaudio libGL libX11 liquid-dsp soapysdr-with-plugins wxGTK31-gtk3 ];
 
   cmakeFlags = [ "-DUSE_HAMLIB=ON" ]
-    ++ stdenv.lib.optional enableDigitalLab "-DENABLE_DIGITAL_LAB=ON";
+    ++ lib.optional enableDigitalLab "-DENABLE_DIGITAL_LAB=ON";
 
   meta = with lib; {
     homepage = "https://cubicsdr.com";
diff --git a/pkgs/applications/radio/direwolf/default.nix b/pkgs/applications/radio/direwolf/default.nix
index 321b103c7f7..e7da78034cc 100644
--- a/pkgs/applications/radio/direwolf/default.nix
+++ b/pkgs/applications/radio/direwolf/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchFromGitHub, cmake, alsaLib, espeak, glibc, gpsd
+{ lib, stdenv, fetchFromGitHub, cmake, alsaLib, espeak, glibc, gpsd
 , hamlib, perl, python, udev }:
 
-with stdenv.lib;
+with lib;
 
 stdenv.mkDerivation rec {
   pname = "direwolf";
diff --git a/pkgs/applications/radio/dsd/default.nix b/pkgs/applications/radio/dsd/default.nix
index 4b9fbcd6af2..35a3e9f44bb 100644
--- a/pkgs/applications/radio/dsd/default.nix
+++ b/pkgs/applications/radio/dsd/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ];
   buildInputs = [
     mbelib libsndfile itpp
-  ] ++ stdenv.lib.optionals portaudioSupport [ portaudio ];
+  ] ++ lib.optionals portaudioSupport [ portaudio ];
 
   doCheck = true;
   preCheck = ''
diff --git a/pkgs/applications/radio/fldigi/default.nix b/pkgs/applications/radio/fldigi/default.nix
index 07e9647f2c3..349999b1eef 100644
--- a/pkgs/applications/radio/fldigi/default.nix
+++ b/pkgs/applications/radio/fldigi/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, hamlib, fltk14, libjpeg, libpng, portaudio, libsndfile,
+{ lib, stdenv, fetchurl, hamlib, fltk14, libjpeg, libpng, portaudio, libsndfile,
   libsamplerate, libpulseaudio, libXinerama, gettext, pkgconfig, alsaLib }:
 
 stdenv.mkDerivation rec {
@@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Digital modem program";
     homepage = "https://sourceforge.net/projects/fldigi/";
-    license = stdenv.lib.licenses.gpl3Plus;
-    maintainers = with stdenv.lib.maintainers; [ relrod ftrvxmtrx ];
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.gpl3Plus;
+    maintainers = with lib.maintainers; [ relrod ftrvxmtrx ];
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/radio/fllog/default.nix b/pkgs/applications/radio/fllog/default.nix
index 649caae0902..270494110d7 100644
--- a/pkgs/applications/radio/fllog/default.nix
+++ b/pkgs/applications/radio/fllog/default.nix
@@ -1,4 +1,5 @@
-{ stdenv
+{ lib
+, stdenv
 , fetchurl
 , fltk13
 , libjpeg
@@ -26,8 +27,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Digital modem log program";
     homepage = "https://sourceforge.net/projects/fldigi/";
-    license = stdenv.lib.licenses.gpl3Plus;
-    maintainers = with stdenv.lib.maintainers; [ dysinger ];
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.gpl3Plus;
+    maintainers = with lib.maintainers; [ dysinger ];
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/radio/flmsg/default.nix b/pkgs/applications/radio/flmsg/default.nix
index fa3f175fcc5..bbde8555547 100644
--- a/pkgs/applications/radio/flmsg/default.nix
+++ b/pkgs/applications/radio/flmsg/default.nix
@@ -1,4 +1,5 @@
-{ stdenv
+{ lib
+, stdenv
 , fetchurl
 , fltk13
 , libjpeg
@@ -26,8 +27,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Digital modem message program";
     homepage = "https://sourceforge.net/projects/fldigi/";
-    license = stdenv.lib.licenses.gpl3Plus;
-    maintainers = with stdenv.lib.maintainers; [ dysinger ];
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.gpl3Plus;
+    maintainers = with lib.maintainers; [ dysinger ];
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/radio/flrig/default.nix b/pkgs/applications/radio/flrig/default.nix
index 322f2eb9a3b..36b0b216598 100644
--- a/pkgs/applications/radio/flrig/default.nix
+++ b/pkgs/applications/radio/flrig/default.nix
@@ -1,4 +1,5 @@
-{ stdenv
+{ lib
+, stdenv
 , fetchurl
 , fltk13
 , libjpeg
@@ -26,8 +27,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Digital modem rig control program";
     homepage = "https://sourceforge.net/projects/fldigi/";
-    license = stdenv.lib.licenses.gpl3Plus;
-    maintainers = with stdenv.lib.maintainers; [ dysinger ];
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.gpl3Plus;
+    maintainers = with lib.maintainers; [ dysinger ];
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/radio/flwrap/default.nix b/pkgs/applications/radio/flwrap/default.nix
index 889c212de4e..f0f16f1e8c9 100644
--- a/pkgs/applications/radio/flwrap/default.nix
+++ b/pkgs/applications/radio/flwrap/default.nix
@@ -1,4 +1,5 @@
-{ stdenv
+{ lib
+, stdenv
 , fetchurl
 , fltk13
 , libjpeg
@@ -26,8 +27,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Digital modem file transfer program";
     homepage = "https://sourceforge.net/projects/fldigi/";
-    license = stdenv.lib.licenses.gpl3Plus;
-    maintainers = with stdenv.lib.maintainers; [ dysinger ];
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.gpl3Plus;
+    maintainers = with lib.maintainers; [ dysinger ];
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/radio/gnuradio/3.7.nix b/pkgs/applications/radio/gnuradio/3.7.nix
index 54fb0d7d66c..76cfa5f414b 100644
--- a/pkgs/applications/radio/gnuradio/3.7.nix
+++ b/pkgs/applications/radio/gnuradio/3.7.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromGitHub
 , fetchpatch
 , cmake
@@ -138,8 +138,8 @@ let
     };
     gr-audio = {
       runtime = []
-        ++ stdenv.lib.optionals stdenv.isLinux [ alsaLib libjack2 ]
-        ++ stdenv.lib.optionals stdenv.isDarwin [ CoreAudio ]
+        ++ lib.optionals stdenv.isLinux [ alsaLib libjack2 ]
+        ++ lib.optionals stdenv.isDarwin [ CoreAudio ]
       ;
       cmakeEnableFlag = "GR_AUDIO";
     };
@@ -198,6 +198,7 @@ let
   };
   shared = (import ./shared.nix {
     inherit
+      lib
       stdenv
       python
       removeReferencesTo
@@ -229,7 +230,7 @@ let
     # From some reason, if these are not set, libcodec2 and gsm are
     # not detected properly (slightly different then what's in
     # ./default.nix).
-    ++ stdenv.lib.optionals (hasFeature "gr-vocoder" features) [
+    ++ lib.optionals (hasFeature "gr-vocoder" features) [
       "-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so"
       "-DLIBCODEC2_INCLUDE_DIR=${codec2}/include"
       "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so"
@@ -238,16 +239,16 @@ let
   ;
   stripDebugList = shared.stripDebugList
     # gr-fcd feature was dropped in 3.8
-    ++ stdenv.lib.optionals (hasFeature "gr-fcd" features) [ "share/gnuradio/examples/fcd" ]
+    ++ lib.optionals (hasFeature "gr-fcd" features) [ "share/gnuradio/examples/fcd" ]
   ;
   preConfigure = ''
   ''
     # wxgui and pygtk are not looked up properly, so we force them to be
     # detected as found, if they are requested by the `features` attrset.
-    + stdenv.lib.optionalString (hasFeature "gr-wxgui" features) ''
+    + lib.optionalString (hasFeature "gr-wxgui" features) ''
       sed -i 's/.*wx\.version.*/set(WX_FOUND TRUE)/g' gr-wxgui/CMakeLists.txt
     ''
-    + stdenv.lib.optionalString (hasFeature "gnuradio-companion" features) ''
+    + lib.optionalString (hasFeature "gnuradio-companion" features) ''
       sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt
     ''
     # If python-support is disabled, don't install volk's (git submodule)
@@ -256,7 +257,7 @@ let
     # NOTE: The same is done for 3.8, but we don't put this string in
     # ./shared.nix since on the next release of 3.8 it won't be needed there,
     # but it will be needed for 3.7, probably for ever.
-    + stdenv.lib.optionalString (!hasFeature "python-support" features) ''
+    + lib.optionalString (!hasFeature "python-support" features) ''
       sed -i -e "/python\/volk_modtool/d" volk/CMakeLists.txt
     ''
   ;
diff --git a/pkgs/applications/radio/gnuradio/ais.nix b/pkgs/applications/radio/gnuradio/ais.nix
index 9c993de65d0..94556561439 100644
--- a/pkgs/applications/radio/gnuradio/ais.nix
+++ b/pkgs/applications/radio/gnuradio/ais.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
 
   nativeBuildInputs = [ cmake makeWrapper pkg-config ];
   buildInputs = [ boost gnuradio cppunit gr-osmosdr log4cpp ]
-             ++ stdenv.lib.optionals pythonSupport [ python swig ];
+             ++ lib.optionals pythonSupport [ python swig ];
 
   postInstall = ''
     for prog in "$out"/bin/*; do
diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix
index 811eb37f4f3..0bc8675690f 100644
--- a/pkgs/applications/radio/gnuradio/default.nix
+++ b/pkgs/applications/radio/gnuradio/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromGitHub
 , fetchpatch
 , cmake
@@ -143,8 +143,8 @@ let
     };
     gr-audio = {
       runtime = []
-        ++ stdenv.lib.optionals stdenv.isLinux [ alsaLib libjack2 ]
-        ++ stdenv.lib.optionals stdenv.isDarwin [ CoreAudio ]
+        ++ lib.optionals stdenv.isLinux [ alsaLib libjack2 ]
+        ++ lib.optionals stdenv.isDarwin [ CoreAudio ]
       ;
       cmakeEnableFlag = "GR_AUDIO";
     };
@@ -193,6 +193,7 @@ let
   shared = (import ./shared.nix {
     inherit
       stdenv
+      lib
       python
       removeReferencesTo
       featuresInfo
@@ -223,7 +224,7 @@ let
     # From some reason, if these are not set, libcodec2 and gsm are not
     # detected properly. NOTE: qradiolink needs libcodec2 to be detected in
     # order to build, see https://github.com/qradiolink/qradiolink/issues/67
-    ++ stdenv.lib.optionals (hasFeature "gr-vocoder" features) [
+    ++ lib.optionals (hasFeature "gr-vocoder" features) [
       "-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so"
       "-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include"
       "-DLIBCODEC2_HAS_FREEDV_API=ON"
@@ -235,7 +236,7 @@ let
   postInstall = shared.postInstall
     # This is the only python reference worth removing, if needed (3.7 doesn't
     # set that reference).
-    + stdenv.lib.optionalString (!hasFeature "python-support" features) ''
+    + lib.optionalString (!hasFeature "python-support" features) ''
       ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
     ''
   ;
@@ -249,7 +250,7 @@ let
     # we'll need to package volk while able to tell it to install or not
     # install python referencing files. When we'll be there, this will help:
     # https://github.com/gnuradio/volk/pull/404
-    + stdenv.lib.optionalString (!hasFeature "python-support" features) ''
+    + lib.optionalString (!hasFeature "python-support" features) ''
       sed -i -e "/python\/volk_modtool/d" volk/CMakeLists.txt
     ''
   ;
diff --git a/pkgs/applications/radio/gnuradio/gsm.nix b/pkgs/applications/radio/gnuradio/gsm.nix
index 39834540ff8..28c5045081b 100644
--- a/pkgs/applications/radio/gnuradio/gsm.nix
+++ b/pkgs/applications/radio/gnuradio/gsm.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
   nativeBuildInputs = [ cmake pkg-config ];
   buildInputs = [
     boost gnuradio makeWrapper cppunit libosmocore gr-osmosdr log4cpp
-  ] ++ stdenv.lib.optionals pythonSupport [ python swig ];
+  ] ++ lib.optionals pythonSupport [ python swig ];
 
   postInstall = ''
     for prog in "$out"/bin/*; do
diff --git a/pkgs/applications/radio/gnuradio/limesdr.nix b/pkgs/applications/radio/gnuradio/limesdr.nix
index 1033b25cb3d..a01fab4975a 100644
--- a/pkgs/applications/radio/gnuradio/limesdr.nix
+++ b/pkgs/applications/radio/gnuradio/limesdr.nix
@@ -21,11 +21,11 @@ in stdenv.mkDerivation {
   nativeBuildInputs = [
     cmake
     pkgconfig
-  ] ++ stdenv.lib.optionals pythonSupport [ swig ];
+  ] ++ lib.optionals pythonSupport [ swig ];
 
   buildInputs = [
     boost gnuradio limesuite log4cpp
-  ] ++ stdenv.lib.optionals pythonSupport [ python ];
+  ] ++ lib.optionals pythonSupport [ python ];
 
 
   meta = with lib; {
diff --git a/pkgs/applications/radio/gnuradio/nacl.nix b/pkgs/applications/radio/gnuradio/nacl.nix
index e87d2a71b1c..f6c21e79454 100644
--- a/pkgs/applications/radio/gnuradio/nacl.nix
+++ b/pkgs/applications/radio/gnuradio/nacl.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
   nativeBuildInputs = [ cmake pkg-config ];
   buildInputs = [
     boost gnuradio uhd makeWrapper libsodium cppunit log4cpp
-  ] ++ stdenv.lib.optionals pythonSupport [ python swig ];
+  ] ++ lib.optionals pythonSupport [ python swig ];
 
   postInstall = ''
     for prog in "$out"/bin/*; do
diff --git a/pkgs/applications/radio/gnuradio/osmosdr.nix b/pkgs/applications/radio/gnuradio/osmosdr.nix
index 90adcf5ffae..436c4309a5b 100644
--- a/pkgs/applications/radio/gnuradio/osmosdr.nix
+++ b/pkgs/applications/radio/gnuradio/osmosdr.nix
@@ -26,8 +26,8 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake makeWrapper pkg-config ];
   buildInputs = [
     boost log4cpp airspy gnuradio hackrf libbladeRF rtl-sdr uhd
-  ] ++ stdenv.lib.optionals stdenv.isLinux [ soapysdr-with-plugins ]
-    ++ stdenv.lib.optionals pythonSupport [ python swig python.pkgs.cheetah ];
+  ] ++ lib.optionals stdenv.isLinux [ soapysdr-with-plugins ]
+    ++ lib.optionals pythonSupport [ python swig python.pkgs.cheetah ];
 
   postInstall = ''
     for prog in "$out"/bin/*; do
diff --git a/pkgs/applications/radio/gnuradio/rds.nix b/pkgs/applications/radio/gnuradio/rds.nix
index 3c90a8ad985..4f15f2a961e 100644
--- a/pkgs/applications/radio/gnuradio/rds.nix
+++ b/pkgs/applications/radio/gnuradio/rds.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake pkg-config ];
   buildInputs = [
     boost gnuradio makeWrapper log4cpp
-  ] ++ stdenv.lib.optionals pythonSupport [ python swig ];
+  ] ++ lib.optionals pythonSupport [ python swig ];
 
   postInstall = ''
     for prog in "$out"/bin/*; do
diff --git a/pkgs/applications/radio/gnuradio/shared.nix b/pkgs/applications/radio/gnuradio/shared.nix
index 66ce0a5f513..e30831f87ee 100644
--- a/pkgs/applications/radio/gnuradio/shared.nix
+++ b/pkgs/applications/radio/gnuradio/shared.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , python
 , qt
 , gtk
@@ -14,9 +14,7 @@
 , fetchSubmodules
 }:
 
-let
-  lib = stdenv.lib;
-in rec {
+rec {
   version = builtins.concatStringsSep "." (
     lib.attrVals [ "major" "minor" "patch" ] versionAttr
   );
diff --git a/pkgs/applications/radio/gnuradio/wrapper.nix b/pkgs/applications/radio/gnuradio/wrapper.nix
index 6b854918f57..aaf74abc2c5 100644
--- a/pkgs/applications/radio/gnuradio/wrapper.nix
+++ b/pkgs/applications/radio/gnuradio/wrapper.nix
@@ -1,4 +1,5 @@
-{ stdenv
+{ lib
+, stdenv
 , unwrapped
 , makeWrapper
 # For lndir
@@ -28,7 +29,7 @@ let
   pythonPkgs = extraPythonPackages
     # Add the extraPackages as python modules as well
     ++ (builtins.map unwrapped.python.pkgs.toPythonModule extraPackages)
-    ++ stdenv.lib.flatten (stdenv.lib.mapAttrsToList (
+    ++ lib.flatten (lib.mapAttrsToList (
       feat: info: (
         if unwrapped.hasFeature feat unwrapped.features then
           (if builtins.hasAttr "pythonRuntime" info then info.pythonRuntime else [])
@@ -36,18 +37,18 @@ let
           []
       )
       ) unwrapped.featuresInfo)
-    ++ stdenv.lib.optionals (unwrapped.hasFeature "python-support" unwrapped.features) [
+    ++ lib.optionals (unwrapped.hasFeature "python-support" unwrapped.features) [
       # Add unwrapped itself as a python module
       (unwrapped.python.pkgs.toPythonModule unwrapped)
     ]
   ;
   python3Env = unwrapped.python.withPackages(ps: pythonPkgs);
 
-  name = (stdenv.lib.appendToName "wrapped" unwrapped).name;
+  name = (lib.appendToName "wrapped" unwrapped).name;
   makeWrapperArgs = builtins.concatStringsSep " " ([
   ]
     # Emulating wrapGAppsHook & wrapQtAppsHook working together
-    ++ stdenv.lib.optionals (
+    ++ lib.optionals (
       (unwrapped.hasFeature "gnuradio-companion" unwrapped.features)
       || (unwrapped.hasFeature "gr-qtgui" unwrapped.features)
       ) [
@@ -57,14 +58,14 @@ let
       "--prefix" "XDG_DATA_DIRS" ":" "${hicolor-icon-theme}/share"
       # Needs to run `gsettings` on startup, see:
       # https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1764890.html
-      "--prefix" "PATH" ":" "${stdenv.lib.getBin glib}/bin"
+      "--prefix" "PATH" ":" "${lib.getBin glib}/bin"
     ]
-    ++ stdenv.lib.optionals (unwrapped.hasFeature "gnuradio-companion" unwrapped.features) [
+    ++ lib.optionals (unwrapped.hasFeature "gnuradio-companion" unwrapped.features) [
       "--set" "GDK_PIXBUF_MODULE_FILE" "${librsvg}/${gdk-pixbuf.moduleDir}.cache"
-      "--prefix" "GIO_EXTRA_MODULES" ":" "${stdenv.lib.getLib dconf}/lib/gio/modules"
+      "--prefix" "GIO_EXTRA_MODULES" ":" "${lib.getLib dconf}/lib/gio/modules"
       "--prefix" "XDG_DATA_DIRS" ":" "${unwrapped.gtk}/share"
       "--prefix" "XDG_DATA_DIRS" ":" "${unwrapped.gtk}/share/gsettings-schemas/${unwrapped.gtk.name}"
-      "--prefix" "GI_TYPELIB_PATH" ":" "${stdenv.lib.makeSearchPath "lib/girepository-1.0" [
+      "--prefix" "GI_TYPELIB_PATH" ":" "${lib.makeSearchPath "lib/girepository-1.0" [
         unwrapped.gtk
         gsettings-desktop-schemas
         atk
@@ -79,17 +80,17 @@ let
         at-spi2-core
       ]}"
     ]
-    ++ stdenv.lib.optionals (extraPackages != []) [
-      "--prefix" "GRC_BLOCKS_PATH" ":" "${stdenv.lib.makeSearchPath "share/gnuradio/grc/blocks" extraPackages}"
+    ++ lib.optionals (extraPackages != []) [
+      "--prefix" "GRC_BLOCKS_PATH" ":" "${lib.makeSearchPath "share/gnuradio/grc/blocks" extraPackages}"
     ]
-    ++ stdenv.lib.optionals (unwrapped.hasFeature "gr-qtgui" unwrapped.features)
+    ++ lib.optionals (unwrapped.hasFeature "gr-qtgui" unwrapped.features)
       # 3.7 builds with qt4
       (if unwrapped.versionAttr.major == "3.8" then
         [
           "--prefix" "QT_PLUGIN_PATH" ":"
-          "${stdenv.lib.getBin unwrapped.qt.qtbase}/${unwrapped.qt.qtbase.qtPluginPrefix}"
+          "${lib.getBin unwrapped.qt.qtbase}/${unwrapped.qt.qtbase.qtPluginPrefix}"
           "--prefix" "QML2_IMPORT_PATH" ":"
-          "${stdenv.lib.getBin unwrapped.qt.qtbase}/${unwrapped.qt.qtbase.qtQmlPrefix}"
+          "${lib.getBin unwrapped.qt.qtbase}/${unwrapped.qt.qtbase.qtQmlPrefix}"
         ]
       else
         # TODO: Add here qt4 related environment for 3.7?
diff --git a/pkgs/applications/radio/gqrx/default.nix b/pkgs/applications/radio/gqrx/default.nix
index a4a1dfa61e4..863c2010868 100644
--- a/pkgs/applications/radio/gqrx/default.nix
+++ b/pkgs/applications/radio/gqrx/default.nix
@@ -21,7 +21,7 @@ mkDerivation rec {
   nativeBuildInputs = [ cmake ];
   buildInputs = [
     qtbase qtsvg gnuradio boost gr-osmosdr rtl-sdr hackrf
-  ] ++ stdenv.lib.optionals pulseaudioSupport [ libpulseaudio ];
+  ] ++ lib.optionals pulseaudioSupport [ libpulseaudio ];
 
   postInstall = ''
     install -vD $src/gqrx.desktop -t "$out/share/applications/"
diff --git a/pkgs/applications/radio/minimodem/default.nix b/pkgs/applications/radio/minimodem/default.nix
index e94561e46dc..0b0f8f2f0cc 100644
--- a/pkgs/applications/radio/minimodem/default.nix
+++ b/pkgs/applications/radio/minimodem/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgconfig, autoconf, automake, libtool
+{ lib, stdenv, fetchFromGitHub, pkgconfig, autoconf, automake, libtool
 , fftw, fftwSinglePrec, alsaLib, libsndfile, libpulseaudio
 }:
 
@@ -33,9 +33,9 @@ stdenv.mkDerivation rec {
     Caller-ID.
     '';
     homepage = "http://www.whence.com/minimodem/";
-    license = stdenv.lib.licenses.gpl3Plus;
-    platforms = with stdenv.lib.platforms; linux;
-    maintainers = with stdenv.lib.maintainers; [ relrod ];
+    license = lib.licenses.gpl3Plus;
+    platforms = with lib.platforms; linux;
+    maintainers = with lib.maintainers; [ relrod ];
   };
 }
 
diff --git a/pkgs/applications/radio/qsstv/default.nix b/pkgs/applications/radio/qsstv/default.nix
index ddf1d6c6feb..2e333e462c6 100644
--- a/pkgs/applications/radio/qsstv/default.nix
+++ b/pkgs/applications/radio/qsstv/default.nix
@@ -29,8 +29,8 @@ mkDerivation rec {
     description = "Qt-based slow-scan TV and fax";
     homepage = "http://users.telenet.be/on4qz/";
     platforms = platforms.linux;
-    license = stdenv.lib.licenses.gpl3;
-    maintainers = with stdenv.lib.maintainers; [ hax404 ];
+    license = lib.licenses.gpl3;
+    maintainers = with lib.maintainers; [ hax404 ];
   };
 }
 
diff --git a/pkgs/applications/radio/rtl-sdr/default.nix b/pkgs/applications/radio/rtl-sdr/default.nix
index 3f69f40424e..0b5381fb601 100644
--- a/pkgs/applications/radio/rtl-sdr/default.nix
+++ b/pkgs/applications/radio/rtl-sdr/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
   #   /etc/udev/rules.d/, and there is no option to install elsewhere. So install
   #   rules manually.
   # * Propagate libusb-1.0 dependency in pkg-config file.
-  postInstall = stdenv.lib.optionalString stdenv.isLinux ''
+  postInstall = lib.optionalString stdenv.isLinux ''
     mkdir -p "$out/etc/udev/rules.d/"
     cp ../rtl-sdr.rules "$out/etc/udev/rules.d/99-rtl-sdr.rules"
 
diff --git a/pkgs/applications/radio/uhd/default.nix b/pkgs/applications/radio/uhd/default.nix
index 033c2c4e2a6..4645ae881a8 100644
--- a/pkgs/applications/radio/uhd/default.nix
+++ b/pkgs/applications/radio/uhd/default.nix
@@ -33,7 +33,7 @@
 
 let
   onOffBool = b: if b then "ON" else "OFF";
-  inherit (stdenv.lib) optionals;
+  inherit (lib) optionals;
 in
 
 stdenv.mkDerivation rec {
@@ -81,7 +81,7 @@ stdenv.mkDerivation rec {
     # TODO: Check if this still needed
     # ABI differences GCC 7.1
     # /nix/store/wd6r25miqbk9ia53pp669gn4wrg9n9cj-gcc-7.3.0/include/c++/7.3.0/bits/vector.tcc:394:7: note: parameter passing for argument of type 'std::vector<uhd::range_t>::iterator {aka __gnu_cxx::__normal_iterator<uhd::range_t*, std::vector<uhd::range_t> >}' changed in GCC 7.1
-    ++ [ (stdenv.lib.optionalString stdenv.isAarch32 "-DCMAKE_CXX_FLAGS=-Wno-psabi") ]
+    ++ [ (lib.optionalString stdenv.isAarch32 "-DCMAKE_CXX_FLAGS=-Wno-psabi") ]
   ;
 
   # Python + Mako are always required for the build itself but not necessary for runtime.