diff options
Diffstat (limited to 'pkgs/development/gnuradio-modules')
8 files changed, 23 insertions, 10 deletions
diff --git a/pkgs/development/gnuradio-modules/ais/default.nix b/pkgs/development/gnuradio-modules/ais/default.nix index 92abb23a5c572..1376fbe657a83 100644 --- a/pkgs/development/gnuradio-modules/ais/default.nix +++ b/pkgs/development/gnuradio-modules/ais/default.nix @@ -14,6 +14,7 @@ , icu , gnuradio , thrift +, gnuradioAtLeast }: mkDerivation rec { @@ -25,7 +26,7 @@ mkDerivation rec { rev = "2162103226f3dae43c8c2ab23b79483b84346665"; sha256 = "1vackka34722d8pcspfwj0j6gc9ic7dqq64sgkrpjm94sh3bmb0b"; }; - disabledForGRafter = "3.9"; + disabled = gnuradioAtLeast "3.9"; nativeBuildInputs = [ cmake diff --git a/pkgs/development/gnuradio-modules/grnet/default.nix b/pkgs/development/gnuradio-modules/grnet/default.nix index 817205cc0ca62..77390e52340ba 100644 --- a/pkgs/development/gnuradio-modules/grnet/default.nix +++ b/pkgs/development/gnuradio-modules/grnet/default.nix @@ -15,6 +15,7 @@ , libpcap , icu , thrift +, gnuradioAtLeast }: let @@ -53,7 +54,7 @@ mkDerivation { pname = "gr-grnet"; version = version.name; inherit src; - disabledForGRafter = "3.10"; + disabled = gnuradioAtLeast "3.10"; patches = [ # Use cross platform struct ip instead of iphdr @@ -73,7 +74,7 @@ mkDerivation { gmp libpcap icu - ] ++ (if lib.versionAtLeast gnuradio.versionAttr.major "3.9" then with python.pkgs; [ + ] ++ (if gnuradioAtLeast "3.9" then with python.pkgs; [ pybind11 numpy ] else [ diff --git a/pkgs/development/gnuradio-modules/gsm/default.nix b/pkgs/development/gnuradio-modules/gsm/default.nix index aef8539431238..9f184b7be7fb7 100644 --- a/pkgs/development/gnuradio-modules/gsm/default.nix +++ b/pkgs/development/gnuradio-modules/gsm/default.nix @@ -10,6 +10,7 @@ , python , libosmocore , osmosdr +, gnuradioAtLeast }: mkDerivation { @@ -21,7 +22,7 @@ mkDerivation { rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d"; sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx"; }; - disabledForGRafter = "3.8"; + disabled = gnuradioAtLeast "3.8"; nativeBuildInputs = [ cmake diff --git a/pkgs/development/gnuradio-modules/limesdr/default.nix b/pkgs/development/gnuradio-modules/limesdr/default.nix index a9ed621cdf118..bdd541f04432f 100644 --- a/pkgs/development/gnuradio-modules/limesdr/default.nix +++ b/pkgs/development/gnuradio-modules/limesdr/default.nix @@ -14,6 +14,7 @@ , gmp , icu , limesuite +, gnuradioAtLeast }: let @@ -33,7 +34,7 @@ let in mkDerivation { pname = "gr-limesdr"; inherit version src; - disabledForGRafter = "3.9"; + disabled = gnuradioAtLeast "3.9"; nativeBuildInputs = [ cmake diff --git a/pkgs/development/gnuradio-modules/mkDerivation.nix b/pkgs/development/gnuradio-modules/mkDerivation.nix index 014968f82cc66..b35c93f90abd3 100644 --- a/pkgs/development/gnuradio-modules/mkDerivation.nix +++ b/pkgs/development/gnuradio-modules/mkDerivation.nix @@ -7,12 +7,18 @@ mkDerivation: args: # Check if it's supposed to not get built for the current gnuradio version -if (builtins.hasAttr "disabledForGRafter" args) && -(lib.versionAtLeast unwrapped.versionAttr.major args.disabledForGRafter) then +if (builtins.hasAttr "disabled" args) && args.disabled then let name = args.name or "${args.pname}"; in throw "Package ${name} is incompatible with GNURadio ${unwrapped.versionAttr.major}" else +if builtins.hasAttr "disabledForGRafter" args then +throw '' + `disabledForGRafter` is superseded by `disabled`. + Use `disabled = gnuradioAtLeast "${unwrapped.versionAttr.major}";` instead. +'' +else + let args_ = { enableParallelBuilding = args.enableParallelBuilding or true; diff --git a/pkgs/development/gnuradio-modules/nacl/default.nix b/pkgs/development/gnuradio-modules/nacl/default.nix index 9f9175eae058b..0900ca943b970 100644 --- a/pkgs/development/gnuradio-modules/nacl/default.nix +++ b/pkgs/development/gnuradio-modules/nacl/default.nix @@ -9,6 +9,7 @@ , logLib , python , libsodium +, gnuradioAtLeast }: mkDerivation { @@ -20,7 +21,7 @@ mkDerivation { rev = "15276bb0fcabf5fe4de4e58df3d579b5be0e9765"; sha256 = "018np0qlk61l7mlv3xxx5cj1rax8f1vqrsrch3higsl25yydbv7v"; }; - disabledForGRafter = "3.8"; + disabled = gnuradioAtLeast "3.8"; nativeBuildInputs = [ cmake diff --git a/pkgs/development/gnuradio-modules/osmosdr/default.nix b/pkgs/development/gnuradio-modules/osmosdr/default.nix index 18b8229cebccd..8e46ac561493d 100644 --- a/pkgs/development/gnuradio-modules/osmosdr/default.nix +++ b/pkgs/development/gnuradio-modules/osmosdr/default.nix @@ -22,6 +22,7 @@ , libbladeRF , rtl-sdr , soapysdr-with-plugins +, gnuradioAtLeast }: let @@ -44,7 +45,7 @@ let in mkDerivation { pname = "gr-osmosdr"; inherit version src; - disabledForGRafter = "3.11"; + disabled = gnuradioAtLeast "3.11"; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/gnuradio-modules/rds/default.nix b/pkgs/development/gnuradio-modules/rds/default.nix index 7ffdd206474a9..9a6f2ccbbad4c 100644 --- a/pkgs/development/gnuradio-modules/rds/default.nix +++ b/pkgs/development/gnuradio-modules/rds/default.nix @@ -12,6 +12,7 @@ , boost , gmp , icu +, gnuradioAtLeast }: let @@ -33,7 +34,7 @@ let in mkDerivation { pname = "gr-rds"; inherit version src; - disabledForGRafter = "3.9"; + disabled = gnuradioAtLeast "3.9"; buildInputs = [ logLib |