Commit 2c9957e4 authored by Doron Behar's avatar Doron Behar
Browse files

uhd: build with utils by default

Build the uhd package with utils enabled by default, and disallow it to
retain python references if these features are disabled. Add a new
package uhdMinimal which does not build with these features. Modify the
gnuradio{,3_{8,9}}Minimal packages so that they use the uhd package
without python references.
parent bae9a9cc
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
, python3
, buildPackages
, enableExamples ? false
, enableUtils ? false
, enableUtils ? true
, libusb1
# Disable dpdk for now due to compilation issues.
, enableDpdk ? false
@@ -150,6 +150,10 @@ stdenv.mkDerivation (finalAttrs: {
    mv $out/lib/uhd/utils/uhd-usrp.rules $out/lib/udev/rules.d/
  '';

  disallowedReferences = optionals (!enablePythonApi && !enableUtils) [
    python3
  ];

  meta = with lib; {
    description = "USRP Hardware Driver (for Software Defined Radio)";
    longDescription = ''
+7 −0
Original line number Diff line number Diff line
@@ -20509,6 +20509,10 @@ with pkgs;
  uefi-firmware-parser = callPackage ../development/tools/analysis/uefi-firmware-parser { };
  uhd = callPackage ../applications/radio/uhd { };
  uhdMinimal = uhd.override {
    enableUtils = false;
    enablePythonApi = false;
  };
  uisp = callPackage ../development/embedded/uisp { };
@@ -31843,6 +31847,7 @@ with pkgs;
        # So it will not reference python
        enableModTool = false;
      };
      uhd = uhdMinimal;
      features = {
        gnuradio-companion = false;
        python-support = false;
@@ -31875,6 +31880,7 @@ with pkgs;
        # So it will not reference python
        enableModTool = false;
      };
      uhd = uhdMinimal;
      features = {
        gnuradio-companion = false;
        python-support = false;
@@ -31906,6 +31912,7 @@ with pkgs;
      volk = volk.override {
        enableModTool = false;
      };
      uhd = uhdMinimal;
      features = {
        gnuradio-companion = false;
        python-support = false;