2015-07-15 10:24:03 +00:00
|
|
|
{ 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/
|
|
|
|
|
2017-08-10 01:36:10 +00:00
|
|
|
for file in $(find $out/bin -type f -executable); do
|
2015-07-15 10:24:03 +00:00
|
|
|
wrapProgram "$file" \
|
|
|
|
--prefix PYTHONPATH : ${stdenv.lib.concatStringsSep ":"
|
2017-08-10 01:36:10 +00:00
|
|
|
(map (path: "$(toPythonPath ${path})") extraPackages)} \
|
2015-07-15 10:24:03 +00:00
|
|
|
--prefix GRC_BLOCKS_PATH : ${makeSearchPath "share/gnuradio/grc/blocks" extraPackages}
|
|
|
|
done
|
|
|
|
|
|
|
|
'';
|
|
|
|
inherit (gnuradio) meta;
|
|
|
|
}
|