gnuradio.pkgs: init
- Write a `mkDerivation` and `mkDerivationWith` function for gnuradio, like qt5. - qradiolink, gqrx: Use gnuradio's callPackage and mkDerivation. - Use gnuradio.callPackage to define all gnuradio.pkgs. - Move all gnuradio packages expressions to pkgs/development/gnuradio-modules/ - modeled after Python's. - Add more paths to gnuradio's wrapper - add the extra packages as python modules, and add their executables with proper env vars wrapping. Co-authored-by: Frederik Rietdijk <fridh@fridh.nl>
This commit is contained in:
co-authored by
Frederik Rietdijk
parent
7690f9a312
commit
2d08e55e9b
@@ -0,0 +1,23 @@
|
||||
{ lib
|
||||
, unwrapped
|
||||
}:
|
||||
|
||||
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
|
||||
let name = args.name or "${args.pname}"; in
|
||||
throw "Package ${name} is incompatible with GNURadio ${unwrapped.versionAttr.major}"
|
||||
else
|
||||
|
||||
let
|
||||
args_ = {
|
||||
enableParallelBuilding = args.enableParallelBuilding or true;
|
||||
nativeBuildInputs = (args.nativeBuildInputs or []);
|
||||
# We add gnuradio itself by default
|
||||
buildInputs = (args.buildInputs or []) ++ [ unwrapped ];
|
||||
};
|
||||
in mkDerivation (args // args_)
|
||||
Reference in New Issue
Block a user