2020-10-16 20:31:20 +00:00
|
|
|
{ lib
|
|
|
|
, unwrapped
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation:
|
|
|
|
|
|
|
|
args:
|
|
|
|
|
|
|
|
# Check if it's supposed to not get built for the current gnuradio version
|
2024-01-16 22:19:41 +00:00
|
|
|
if (builtins.hasAttr "disabled" args) && args.disabled then
|
2020-10-16 20:31:20 +00:00
|
|
|
let name = args.name or "${args.pname}"; in
|
|
|
|
throw "Package ${name} is incompatible with GNURadio ${unwrapped.versionAttr.major}"
|
|
|
|
else
|
|
|
|
|
2024-01-16 22:19:41 +00:00
|
|
|
if builtins.hasAttr "disabledForGRafter" args then
|
|
|
|
throw ''
|
|
|
|
`disabledForGRafter` is superseded by `disabled`.
|
2024-01-30 04:04:55 +00:00
|
|
|
Use `disabled = gnuradioAtLeast "${args.disabledForGRafter}";` instead.
|
2024-01-16 22:19:41 +00:00
|
|
|
''
|
|
|
|
else
|
|
|
|
|
2020-10-16 20:31:20 +00:00
|
|
|
let
|
|
|
|
args_ = {
|
|
|
|
enableParallelBuilding = args.enableParallelBuilding or true;
|
|
|
|
nativeBuildInputs = (args.nativeBuildInputs or []);
|
2021-03-13 11:50:15 +00:00
|
|
|
# We add gnuradio and volk itself by default - most gnuradio based packages
|
|
|
|
# will not consider it a depenency worth mentioning and it will almost
|
|
|
|
# always be needed
|
|
|
|
buildInputs = (args.buildInputs or []) ++ [ unwrapped unwrapped.volk ];
|
2020-10-16 20:31:20 +00:00
|
|
|
};
|
|
|
|
in mkDerivation (args // args_)
|