about 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/chirp/default.nix7
-rw-r--r--pkgs/applications/radio/cloudlog/default.nix4
-rw-r--r--pkgs/applications/radio/dablin/default.nix4
-rw-r--r--pkgs/applications/radio/dsd/default.nix2
-rw-r--r--pkgs/applications/radio/freedv/default.nix4
-rw-r--r--pkgs/applications/radio/gnuradio/default.nix4
-rw-r--r--pkgs/applications/radio/gnuradio/wrapper.nix4
-rw-r--r--pkgs/applications/radio/gqrx/default.nix4
-rw-r--r--pkgs/applications/radio/limesuite/default.nix3
-rw-r--r--pkgs/applications/radio/openwebrx/default.nix4
-rw-r--r--pkgs/applications/radio/quisk/default.nix4
-rw-r--r--pkgs/applications/radio/rtl-sdr/default.nix107
-rw-r--r--pkgs/applications/radio/sdrangel/default.nix4
-rw-r--r--pkgs/applications/radio/soundmodem/default.nix17
-rw-r--r--pkgs/applications/radio/uhd/default.nix145
15 files changed, 214 insertions, 103 deletions
diff --git a/pkgs/applications/radio/chirp/default.nix b/pkgs/applications/radio/chirp/default.nix
index 066c93361899b..0bb054e3d52ed 100644
--- a/pkgs/applications/radio/chirp/default.nix
+++ b/pkgs/applications/radio/chirp/default.nix
@@ -1,5 +1,6 @@
 { lib
 , fetchFromGitHub
+, writeShellScript
 , glib
 , gsettings-desktop-schemas
 , python3
@@ -9,7 +10,7 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "chirp";
-  version = "unstable-2024-02-08";
+  version = "0.4.0-unstable-2024-02-08";
 
   src = fetchFromGitHub {
     owner = "kk7ds";
@@ -37,7 +38,9 @@ python3.pkgs.buildPythonApplication rec {
   doCheck = false;
 
   passthru.updateScript = unstableGitUpdater {
-    branch = "py3";
+    tagConverter = writeShellScript "chirp-tag-converter.sh" ''
+      sed -e 's/^release_//g' -e 's/_/./g'
+    '';
   };
 
   meta = with lib; {
diff --git a/pkgs/applications/radio/cloudlog/default.nix b/pkgs/applications/radio/cloudlog/default.nix
index 862bbcdb5e5b2..2e9393dfedae7 100644
--- a/pkgs/applications/radio/cloudlog/default.nix
+++ b/pkgs/applications/radio/cloudlog/default.nix
@@ -8,13 +8,13 @@
 
 stdenvNoCC.mkDerivation rec {
   pname = "cloudlog";
-  version = "2.6.7";
+  version = "2.6.9";
 
   src = fetchFromGitHub {
     owner = "magicbug";
     repo = "Cloudlog";
     rev = version;
-    hash = "sha256-blWMfe/eqeccGE5dWVJWV7L1akWnhO3t5n8HbjlJIcA=";
+    hash = "sha256-DyBo56NS15s+t9Dl8xCC7MQAqMmZ91FYUYOV4vyJ/Yo=";
   };
 
   postPatch = ''
diff --git a/pkgs/applications/radio/dablin/default.nix b/pkgs/applications/radio/dablin/default.nix
index 70c322f268e87..5ccce0a2dc369 100644
--- a/pkgs/applications/radio/dablin/default.nix
+++ b/pkgs/applications/radio/dablin/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   pname = "dablin";
-  version = "1.15.0";
+  version = "1.16.0";
 
   src = fetchFromGitHub {
     owner = "Opendigitalradio";
     repo = "dablin";
     rev = version;
-    sha256 = "sha256-tmmOk7nOkuSCjPNHiwAqP5yf1r8+fsCeDGCxhZUImD4=";
+    sha256 = "sha256-1rjL0dSEgF7FF72KiT6Tyj7/wbRc24LzyzmM1IGdglc=";
   };
 
   nativeBuildInputs = [ cmake pkg-config ];
diff --git a/pkgs/applications/radio/dsd/default.nix b/pkgs/applications/radio/dsd/default.nix
index 72b6f305d3c61..620923377add3 100644
--- a/pkgs/applications/radio/dsd/default.nix
+++ b/pkgs/applications/radio/dsd/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
     homepage = "https://github.com/szechyjs/dsd";
     license = licenses.gpl2;
     platforms = platforms.unix;
-    maintainers = with maintainers; [ andrew-d ];
+    maintainers = with maintainers; [ ];
     mainProgram = "dsd";
   };
 }
diff --git a/pkgs/applications/radio/freedv/default.nix b/pkgs/applications/radio/freedv/default.nix
index f02337ff71beb..8c108af5f82ea 100644
--- a/pkgs/applications/radio/freedv/default.nix
+++ b/pkgs/applications/radio/freedv/default.nix
@@ -25,13 +25,13 @@
 
 stdenv.mkDerivation rec {
   pname = "freedv";
-  version = "1.9.8";
+  version = "1.9.9.1";
 
   src = fetchFromGitHub {
     owner = "drowe67";
     repo = "freedv-gui";
     rev = "v${version}";
-    hash = "sha256-JbLP65fC6uHrHXpSUwtgYHB+VLfheo5RU3C44lx8QlQ=";
+    hash = "sha256-i0SVu3txC+JUp0P6cFlmn/66lOmii7JMGIvc43nZoOE=";
   };
 
   postPatch = lib.optionalString stdenv.isDarwin ''
diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix
index 5d3d1d3d18b40..c03a3decb65c5 100644
--- a/pkgs/applications/radio/gnuradio/default.nix
+++ b/pkgs/applications/radio/gnuradio/default.nix
@@ -45,11 +45,11 @@
 # If one wishes to use a different src or name for a very custom build
 , overrideSrc ? {}
 , pname ? "gnuradio"
-, version ? "3.10.9.2"
+, version ? "3.10.10.0"
 }:
 
 let
-  sourceSha256 = "sha256-SMalZwIvATZ3rqAAqeSmf8/RJ1d9pp7NvoWO/YP0BMc=";
+  sourceSha256 = "sha256-pEVWhXDjOevrduDbZQbiDbODZY8PpsGY4O8yxrwlCcs=";
   featuresInfo = {
     # Needed always
     basic = {
diff --git a/pkgs/applications/radio/gnuradio/wrapper.nix b/pkgs/applications/radio/gnuradio/wrapper.nix
index ac08d17397fa7..fdaa76f6f7e8e 100644
--- a/pkgs/applications/radio/gnuradio/wrapper.nix
+++ b/pkgs/applications/radio/gnuradio/wrapper.nix
@@ -58,6 +58,10 @@ let
   # may wish to wrap GR without python support.
   pythonPkgs = extraPythonPackages
     ++ [ (unwrapped.python.pkgs.toPythonModule unwrapped) ]
+    ++ unwrapped.passthru.uhd.pythonPath
+    ++ lib.optionals (unwrapped.passthru.uhd.pythonPath != []) [
+      (unwrapped.python.pkgs.toPythonModule unwrapped.passthru.uhd)
+    ]
     # Add the extraPackages as python modules as well
     ++ (builtins.map unwrapped.python.pkgs.toPythonModule extraPackages)
     ++ lib.flatten (lib.mapAttrsToList (
diff --git a/pkgs/applications/radio/gqrx/default.nix b/pkgs/applications/radio/gqrx/default.nix
index 1079b2c19641b..a574066045718 100644
--- a/pkgs/applications/radio/gqrx/default.nix
+++ b/pkgs/applications/radio/gqrx/default.nix
@@ -27,13 +27,13 @@ assert !(pulseaudioSupport && portaudioSupport);
 
 gnuradioMinimal.pkgs.mkDerivation rec {
   pname = "gqrx";
-  version = "2.17.4";
+  version = "2.17.5";
 
   src = fetchFromGitHub {
     owner = "gqrx-sdr";
     repo = "gqrx";
     rev = "v${version}";
-    hash = "sha256-7TjmtF0B+dxUcoXXzpF47dHwxhNMKKQ8Mpf/FFTuwl4=";
+    hash = "sha256-9VePsl/vaSTZ1TMyIeaGoZNrZv+O/7BxQ3ubD5S2EjY=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/applications/radio/limesuite/default.nix b/pkgs/applications/radio/limesuite/default.nix
index f92b63a9ba983..d8d7bcd22d0a8 100644
--- a/pkgs/applications/radio/limesuite/default.nix
+++ b/pkgs/applications/radio/limesuite/default.nix
@@ -2,7 +2,7 @@
 , sqlite, wxGTK32, libusb1, soapysdr
 , mesa_glu, libX11, gnuplot, fltk
 , GLUT
-, withGui ? !stdenv.isDarwin # withGui transitively depends on mesa, which is broken on darwin
+, withGui ? false
 }:
 
 stdenv.mkDerivation rec {
@@ -48,6 +48,7 @@ stdenv.mkDerivation rec {
     license = licenses.asl20;
     maintainers = with maintainers; [ markuskowa ];
     platforms = platforms.unix;
+    badPlatforms = lib.optionals withGui platforms.darwin; # withGui transitively depends on mesa, which is broken on darwin
   };
 }
 
diff --git a/pkgs/applications/radio/openwebrx/default.nix b/pkgs/applications/radio/openwebrx/default.nix
index b85d02ce042eb..0d65fe8e629b8 100644
--- a/pkgs/applications/radio/openwebrx/default.nix
+++ b/pkgs/applications/radio/openwebrx/default.nix
@@ -62,13 +62,13 @@ let
 in
 buildPythonApplication rec {
   pname = "openwebrx";
-  version = "1.2.0";
+  version = "1.2.2";
 
   src = fetchFromGitHub {
     owner = "jketterl";
     repo = pname;
     rev = version;
-    sha256 = "sha256-7gcgwa9vQT2u8PQusuXKted2Hk0K+Zk6ornSG1K/D4c=";
+    hash = "sha256-i3Znp5Sxs/KtJazHh2v9/2P+3cEocWB5wIpF7E4pK9s=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/applications/radio/quisk/default.nix b/pkgs/applications/radio/quisk/default.nix
index c5034bd33efcd..8fa180e705c66 100644
--- a/pkgs/applications/radio/quisk/default.nix
+++ b/pkgs/applications/radio/quisk/default.nix
@@ -8,11 +8,11 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "quisk";
-  version = "4.2.31";
+  version = "4.2.32";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-WzB/KAkjJ6zPPfOe35kbT3HbbCNQjm44GL0hInk3TH8=";
+    sha256 = "sha256-zzcygf7oVICO2/wfgyej1GD78fQB1xNRGHq19w6K4uY=";
   };
 
   buildInputs = [
diff --git a/pkgs/applications/radio/rtl-sdr/default.nix b/pkgs/applications/radio/rtl-sdr/default.nix
index 0d454e0be436a..f0bbba9b0a3ba 100644
--- a/pkgs/applications/radio/rtl-sdr/default.nix
+++ b/pkgs/applications/radio/rtl-sdr/default.nix
@@ -1,45 +1,96 @@
 { lib
 , stdenv
+, fetchFromGitea
 , fetchFromGitHub
 , cmake
 , pkg-config
 , libusb1
 }:
+let
+  generic = { version, pname, src, meta }:
+    stdenv.mkDerivation {
+      inherit version pname src;
+      nativeBuildInputs = [ pkg-config cmake ];
+      propagatedBuildInputs = [ libusb1 ];
 
-stdenv.mkDerivation rec {
-  pname = "rtl-sdr";
-  version = "0.9.0";
+      cmakeFlags = lib.optionals stdenv.isLinux [
+        "-DINSTALL_UDEV_RULES=ON"
+        "-DWITH_RPC=ON"
+      ];
 
-  src = fetchFromGitHub {
-    owner = "librtlsdr";
-    repo = "librtlsdr";
-    rev = "v${version}";
-    hash = "sha256-I1rbywQ0ZBw26wZdtMBkfpj7+kv09XKrrcoDuhIkRmw=";
-  };
+      postPatch = ''
+        substituteInPlace CMakeLists.txt \
+          --replace '/etc/udev/rules.d' "$out/etc/udev/rules.d" \
+          --replace "VERSION_INFO_PATCH_VERSION git" "VERSION_INFO_PATCH_VERSION ${lib.versions.patch version}"
 
-  postPatch = ''
-    substituteInPlace CMakeLists.txt \
-      --replace '/etc/udev/rules.d' "$out/etc/udev/rules.d" \
-      --replace "VERSION_INFO_PATCH_VERSION git" "VERSION_INFO_PATCH_VERSION ${lib.versions.patch version}"
+        substituteInPlace rtl-sdr.rules \
+          --replace 'MODE:="0666"' 'ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"'
+      '';
 
-    substituteInPlace rtl-sdr.rules \
-      --replace 'MODE:="0666"' 'ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"'
-  '';
+      meta = with lib; {
+        inherit (meta) longDescription homepage;
+        description = "Software to turn the RTL2832U into a SDR receiver";
+        license = licenses.gpl2Plus;
+        maintainers = with maintainers; [ bjornfor skovati Tungsten842 ];
+        platforms = platforms.unix;
+        mainProgram = "rtl_sdr";
+      };
+    };
+in
+{
+  rtl-sdr-osmocom = generic rec {
+    pname = "rtl-sdr-osmocom";
+    version = "2.0.1";
 
-  nativeBuildInputs = [ pkg-config cmake ];
+    src = fetchFromGitea {
+      domain = "gitea.osmocom.org";
+      owner = "sdr";
+      repo = "rtl-sdr";
+      rev = "v${version}";
+      hash = "sha256-+RYSCn+wAkb9e7NRI5kLY8a6OXtJu7QcSUht1R6wDX0=";
+    };
+    meta = {
+      longDescription = "Rtl-sdr library by the Osmocom project";
+      homepage = "https://gitea.osmocom.org/sdr/rtl-sdr";
+    };
+  };
 
-  propagatedBuildInputs = [ libusb1 ];
+  rtl-sdr-librtlsdr = generic rec {
+    pname = "rtl-sdr-librtlsdr";
+    version = "0.9.0";
 
-  cmakeFlags = lib.optionals stdenv.isLinux [
-    "-DINSTALL_UDEV_RULES=ON"
-    "-DWITH_RPC=ON"
-  ];
+    src = fetchFromGitHub {
+      owner = "librtlsdr";
+      repo = "librtlsdr";
+      rev = "v${version}";
+      hash = "sha256-I1rbywQ0ZBw26wZdtMBkfpj7+kv09XKrrcoDuhIkRmw=";
+    };
+    meta = {
+      longDescription = ''
+        Fork of the rtl-sdr library by the Osmocom project. A list of differences
+        can be found here: https://github.com/librtlsdr/librtlsdr/blob/master/README_improvements.md
+      '';
+      homepage = "https://github.com/librtlsdr/librtlsdr";
+    };
+  };
 
-  meta = with lib; {
-    description = "Turns your Realtek RTL2832 based DVB dongle into a SDR receiver";
-    homepage = "https://github.com/librtlsdr/librtlsdr";
-    license = licenses.gpl2Plus;
-    maintainers = with maintainers; [ bjornfor ];
-    platforms = platforms.linux ++ platforms.darwin;
+  rtl-sdr-blog = generic rec {
+    pname = "rtl-sdr-blog";
+    version = "1.3.5";
+
+    src = fetchFromGitHub {
+      owner = "rtlsdrblog";
+      repo = "rtl-sdr-blog";
+      rev = version;
+      hash = "sha256-7FpT+BoQ2U8KiKwX4NfEwrO3lMBti7RX8uKtT5dFH8M=";
+    };
+    meta = {
+      longDescription = ''
+        Fork of the rtl-sdr library by the Osmocom project. A list of differences
+        can be found here: https://github.com/rtlsdrblog/rtl-sdr-blog/blob/master/README
+      '';
+      homepage = "https://github.com/rtlsdrblog/rtl-sdr-blog";
+    };
   };
+
 }
diff --git a/pkgs/applications/radio/sdrangel/default.nix b/pkgs/applications/radio/sdrangel/default.nix
index aa5b3426d19b7..dd9dda24a7dac 100644
--- a/pkgs/applications/radio/sdrangel/default.nix
+++ b/pkgs/applications/radio/sdrangel/default.nix
@@ -52,13 +52,13 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "sdrangel";
-  version = "7.19.1";
+  version = "7.20.0";
 
   src = fetchFromGitHub {
     owner = "f4exb";
     repo = "sdrangel";
     rev = "v${finalAttrs.version}";
-    hash = "sha256-nPJaO8GDA2HtbvC7mHzbFMQMs1tRYB44lw2lnUy6Di4=";
+    hash = "sha256-sS/ASTMdNJpllHqtmUsG+qBQ77j8IcG6l4g53/Lmcwk=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/applications/radio/soundmodem/default.nix b/pkgs/applications/radio/soundmodem/default.nix
index 01a8006822f69..f69fbfecd608c 100644
--- a/pkgs/applications/radio/soundmodem/default.nix
+++ b/pkgs/applications/radio/soundmodem/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, pkg-config, alsa-lib, audiofile, gtk2, libxml2 }:
+{ lib, stdenv, fetchurl, pkg-config, alsa-lib, audiofile, gtk2, libxml2, copyDesktopItems, makeDesktopItem }:
 
 stdenv.mkDerivation rec {
   pname = "soundmodem";
@@ -9,13 +9,26 @@ stdenv.mkDerivation rec {
     sha256 = "156l3wjnh5rcisxb42kcmlf74swf679v4xnj09zy5j74rd4h721z";
   };
 
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [
+    pkg-config
+    copyDesktopItems
+  ];
   buildInputs = [ alsa-lib audiofile gtk2 libxml2 ];
 
   patches = [ ./matFix.patch ];
 
   doCheck = true;
 
+  desktopItems = [
+    (makeDesktopItem {
+      name = "SoundmodemConfig";
+      exec = "soundmodemconfig";
+      desktopName = "SoundModemConfig";
+      comment = "Audio based modem for ham radio supporting ax.25";
+      categories = [ "Audio" ];
+    })
+  ];
+
   meta = with lib; {
     description = "Audio based modem for ham radio supporting ax.25";
     longDescription = ''
diff --git a/pkgs/applications/radio/uhd/default.nix b/pkgs/applications/radio/uhd/default.nix
index c3f7b58fa1ba6..947d7d48108d2 100644
--- a/pkgs/applications/radio/uhd/default.nix
+++ b/pkgs/applications/radio/uhd/default.nix
@@ -8,15 +8,8 @@
 , boost
 , ncurses
 , enableCApi ? true
-# Although we handle the Python API's dependencies in pythonEnvArg, this
-# feature is currently disabled as upstream attempts to run `python setup.py
-# install` by itself, and it fails because the Python's environment's prefix is
-# not a writable directly. Adding support for this feature would require using
-# python's pypa/build nad pypa/install hooks directly, and currently it is hard
-# to do that because it all happens after a long buildPhase of the C API.
-, enablePythonApi ? false
+, enablePythonApi ? true
 , python3
-, buildPackages
 , enableExamples ? false
 , enableUtils ? true
 , libusb1
@@ -38,13 +31,7 @@
 }:
 
 let
-  onOffBool = b: if b then "ON" else "OFF";
-  inherit (lib) optionals;
-  # Later used in pythonEnv generation. Python + mako are always required for the build itself but not necessary for runtime.
-  pythonEnvArg = (ps: with ps; [ mako ]
-    ++ optionals (enablePythonApi) [ numpy setuptools ]
-    ++ optionals (enableUtils) [ requests six ]
-  );
+  inherit (lib) optionals cmakeBool;
 in
 
 stdenv.mkDerivation (finalAttrs: {
@@ -72,7 +59,30 @@ stdenv.mkDerivation (finalAttrs: {
     # hash.
     sha256 = "17g503mhndaabrdl7qai3rdbafr8xx8awsyr7h2bdzwzprzmh4m3";
   };
+  # This are the minimum required Python dependencies, this attribute might
+  # be useful if you want to build a development environment with a python
+  # interpreter able to import the uhd module.
+  pythonPath = optionals (enablePythonApi || enableUtils) [
+    python3.pkgs.numpy
+    python3.pkgs.setuptools
+  ] ++ optionals (enableUtils) [
+    python3.pkgs.requests
+    python3.pkgs.six
+
+    /* These deps are needed for the usrp_hwd.py utility, however even if they
+    would have been added here, the utility wouldn't have worked because it
+    depends on an old python library mprpc that is not supported for Python >
+    3.8. See also report upstream:
+    https://github.com/EttusResearch/uhd/issues/744
+
+    python3.pkgs.gevent
+    python3.pkgs.pyudev
+    python3.pkgs.pyroute2
+
+    */
+  ];
   passthru = {
+    runtimePython = python3.withPackages (ps: finalAttrs.pythonPath);
     updateScript = [
       ./update.sh
       # Pass it this file name as argument
@@ -83,66 +93,91 @@ stdenv.mkDerivation (finalAttrs: {
   cmakeFlags = [
     "-DENABLE_LIBUHD=ON"
     "-DENABLE_USB=ON"
-    "-DENABLE_TESTS=ON" # This installs tests as well so we delete them via postPhases
-    "-DENABLE_EXAMPLES=${onOffBool enableExamples}"
-    "-DENABLE_UTILS=${onOffBool enableUtils}"
-    "-DENABLE_C_API=${onOffBool enableCApi}"
-    "-DENABLE_PYTHON_API=${onOffBool enablePythonApi}"
-    "-DENABLE_DPDK=${onOffBool enableDpdk}"
+    # Regardless of doCheck, we want to build the tests to help us gain
+    # confident that the package is OK.
+    "-DENABLE_TESTS=ON"
+    (cmakeBool "ENABLE_EXAMPLES" enableExamples)
+    (cmakeBool "ENABLE_UTILS" enableUtils)
+    (cmakeBool "ENABLE_C_API" enableCApi)
+    (cmakeBool "ENABLE_PYTHON_API" enablePythonApi)
+    /*
+
+    Otherwise python tests fail. Using a dedicated pythonEnv for either or both
+    nativeBuildInputs and buildInputs makes upstream's cmake scripts fail to
+    install the Python API as reported on our end at [1] (we don't want
+    upstream to think we are in a virtual environment because we use
+    python3.withPackages...).
+
+    Putting simply the python dependencies in the nativeBuildInputs and
+    buildInputs as they are now from some reason makes the `python` in the
+    checkPhase fail to find the python dependencies, as reported at [2]. Even
+    using nativeCheckInputs with the python dependencies, or using a
+    `python3.withPackages` wrapper in nativeCheckInputs, doesn't help, as the
+    `python` found in $PATH first is the one from nativeBuildInputs.
+
+    [1]: https://github.com/NixOS/nixpkgs/pull/307435
+    [2]: https://discourse.nixos.org/t/missing-python-package-in-checkphase/9168/
+
+    Hence we use upstream's provided cmake flag to control which python
+    interpreter they will use to run the the python tests.
+
+    */
+    "-DRUNTIME_PYTHON_EXECUTABLE=${lib.getExe finalAttrs.passthru.runtimePython}"
+    (cmakeBool "ENABLE_DPDK" enableDpdk)
     # Devices
-    "-DENABLE_OCTOCLOCK=${onOffBool enableOctoClock}"
-    "-DENABLE_MPMD=${onOffBool enableMpmd}"
-    "-DENABLE_B100=${onOffBool enableB100}"
-    "-DENABLE_B200=${onOffBool enableB200}"
-    "-DENABLE_USRP1=${onOffBool enableUsrp1}"
-    "-DENABLE_USRP2=${onOffBool enableUsrp2}"
-    "-DENABLE_X300=${onOffBool enableX300}"
-    "-DENABLE_N300=${onOffBool enableN300}"
-    "-DENABLE_N320=${onOffBool enableN320}"
-    "-DENABLE_E300=${onOffBool enableE300}"
-    "-DENABLE_E320=${onOffBool enableE320}"
-  ]
+    (cmakeBool "ENABLE_OCTOCLOCK" enableOctoClock)
+    (cmakeBool "ENABLE_MPMD" enableMpmd)
+    (cmakeBool "ENABLE_B100" enableB100)
+    (cmakeBool "ENABLE_B200" enableB200)
+    (cmakeBool "ENABLE_USRP1" enableUsrp1)
+    (cmakeBool "ENABLE_USRP2" enableUsrp2)
+    (cmakeBool "ENABLE_X300" enableX300)
+    (cmakeBool "ENABLE_N300" enableN300)
+    (cmakeBool "ENABLE_N320" enableN320)
+    (cmakeBool "ENABLE_E300" enableE300)
+    (cmakeBool "ENABLE_E320" enableE320)
     # 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
-    ++ [ (lib.optionalString stdenv.isAarch32 "-DCMAKE_CXX_FLAGS=-Wno-psabi") ]
-  ;
-
-  pythonEnv = python3.withPackages pythonEnvArg;
+  ] ++ optionals stdenv.isAarch32 [
+    "-DCMAKE_CXX_FLAGS=-Wno-psabi"
+  ];
 
   nativeBuildInputs = [
     cmake
     pkg-config
     # Present both here and in buildInputs for cross compilation.
-    (buildPackages.python3.withPackages pythonEnvArg)
+    python3
+    python3.pkgs.mako
+    # We add this unconditionally, but actually run wrapPythonPrograms only if
+    # python utilities are enabled
+    python3.pkgs.wrapPython
   ];
-  buildInputs = [
+  buildInputs = finalAttrs.pythonPath ++ [
     boost
     libusb1
-  ]
-    # However, if enableLibuhd_Python_api *or* enableUtils is on, we need
-    # pythonEnv for runtime as well. The utilities' runtime dependencies are
-    # handled at the environment
-    ++ optionals (enableExamples) [ ncurses ncurses.dev ]
-    ++ optionals (enablePythonApi || enableUtils) [ finalAttrs.pythonEnv ]
-    ++ optionals (enableDpdk) [ dpdk ]
-  ;
+  ] ++ optionals (enableExamples) [
+    ncurses ncurses.dev
+  ] ++ optionals (enableDpdk) [
+    dpdk
+  ];
 
   # many tests fails on darwin, according to ofborg
   doCheck = !stdenv.isDarwin;
 
   # Build only the host software
   preConfigure = "cd host";
-  # TODO: Check if this still needed, perhaps relevant:
-  # https://files.ettus.com/manual_archive/v3.15.0.0/html/page_build_guide.html#build_instructions_unix_arm
   patches = [
-    # Disable tests that fail in the sandbox
+    # Disable tests that fail in the sandbox, last checked at version 4.6.0.0
     ./no-adapter-tests.patch
   ];
 
-  postPhases = [ "installFirmware" "removeInstalledTests" ]
-    ++ optionals (enableUtils && stdenv.hostPlatform.isLinux) [ "moveUdevRules" ]
-  ;
+  postPhases = [
+    "installFirmware"
+    "removeInstalledTests"
+  ] ++ optionals (enableUtils && stdenv.hostPlatform.isLinux) [
+    "moveUdevRules"
+  ];
 
   # UHD expects images in `$CMAKE_INSTALL_PREFIX/share/uhd/images`
   installFirmware = ''
@@ -162,6 +197,10 @@ stdenv.mkDerivation (finalAttrs: {
     mv $out/lib/uhd/utils/uhd-usrp.rules $out/lib/udev/rules.d/
   '';
 
+  # Wrap the python utilities with our pythonPath definition
+  postFixup = lib.optionalString (enablePythonApi && enableUtils) ''
+    wrapPythonPrograms
+  '';
   disallowedReferences = optionals (!enablePythonApi && !enableUtils) [
     python3
   ];