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:
Moritz Ulrich 2015-07-15 12:24:03 +02:00
parent b9c32340a7
commit 022527a5e1
2 changed files with 29 additions and 0 deletions

View 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;
}

View File

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