Merge pull request #284482 from chuangzhu/gnuradio-disabled

gnuradio: disabledForGRafter -> disabled
This commit is contained in:
Doron Behar 2024-01-29 11:13:45 +02:00 committed by GitHub
commit b394a3fe1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 26 additions and 10 deletions

View File

@ -104,6 +104,8 @@ in {
featuresInfo
python
;
gnuradioOlder = lib.versionOlder versionAttr.major;
gnuradioAtLeast = lib.versionAtLeast versionAttr.major;
} // lib.optionalAttrs (hasFeature "gr-qtgui") {
inherit qt;
} // lib.optionalAttrs (hasFeature "gnuradio-companion") {

View File

@ -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

View File

@ -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 [

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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" ];

View File

@ -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

View File

@ -24,6 +24,7 @@ let
;
inherit mkDerivationWith mkDerivation;
inherit gnuradio;
inherit (gnuradio) gnuradioOlder gnuradioAtLeast;
} // lib.optionalAttrs (gnuradio.hasFeature "gr-uhd") {
inherit (gnuradio) uhd;
});