mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
Gnuradio: Add gnuradio-wrapper and gnuradio-full.
gnuradio-wrapper is a simple derivation wrapping $(gnuradio)/bin/* to make other blocks (from `extraPackages') available. gnuradio-full uses gnuradio-wrapper to build gnuradio with blocks from gnuradio-osmosdr (therefore allowing the use of rtl-sdr, hackrf, the ccc-camp2015 badge, and similar).
This commit is contained in:
parent
b9c32340a7
commit
022527a5e1
23
pkgs/applications/misc/gnuradio/wrapper.nix
Normal file
23
pkgs/applications/misc/gnuradio/wrapper.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ stdenv, gnuradio, makeWrapper, python
|
||||
, extraPackages ? [] }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = (appendToName "with-packages" gnuradio).name;
|
||||
buildInputs = [ makeWrapper python ];
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
ln -s "${gnuradio}"/bin/* $out/bin/
|
||||
|
||||
for file in "$out"/bin/*; do
|
||||
wrapProgram "$file" \
|
||||
--prefix PYTHONPATH : ${stdenv.lib.concatStringsSep ":"
|
||||
(map (path: "$(toPythonPath ${path})") extraPackages)} \
|
||||
--prefix GRC_BLOCKS_PATH : ${makeSearchPath "share/gnuradio/grc/blocks" extraPackages}
|
||||
done
|
||||
|
||||
'';
|
||||
inherit (gnuradio) meta;
|
||||
}
|
@ -11309,6 +11309,12 @@ let
|
||||
fftw = fftwFloat;
|
||||
};
|
||||
|
||||
gnuradio-wrapper = callPackage ../applications/misc/gnuradio/wrapper.nix { };
|
||||
|
||||
gnuradio-full = gnuradio-wrapper.override {
|
||||
extraPackages = [ gnuradio-osmosdr ];
|
||||
};
|
||||
|
||||
gnuradio-osmosdr = callPackage ../applications/misc/gnuradio-osmosdr { };
|
||||
|
||||
goldendict = callPackage ../applications/misc/goldendict { };
|
||||
|
Loading…
Reference in New Issue
Block a user