Merge pull request #34593 from taktoa/taktoa/gnuradio-wrapper-fix

gnuradio: fix wrapper
This commit is contained in:
Andreas Rammhold 2018-02-05 13:52:48 +00:00 committed by GitHub
commit 2bff46d193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,6 @@
{ stdenv, gnuradio, makeWrapper, python
, extraPackages ? [] }:
{ stdenv, gnuradio, makeWrapper, python, extraPackages ? [] }:
with stdenv.lib;
with { inherit (stdenv.lib) appendToName makeSearchPath; };
stdenv.mkDerivation {
name = (appendToName "with-packages" gnuradio).name;
@ -11,13 +10,15 @@ stdenv.mkDerivation {
mkdir -p $out/bin
ln -s "${gnuradio}"/bin/* $out/bin/
for file in $(find $out/bin -type f -executable); do
wrapProgram "$file" \
--prefix PYTHONPATH : ${stdenv.lib.concatStringsSep ":"
(map (path: "$(toPythonPath ${path})") extraPackages)} \
--prefix GRC_BLOCKS_PATH : ${makeSearchPath "share/gnuradio/grc/blocks" extraPackages}
for file in $(find -L $out/bin -type f); do
if test -x "$(readlink -f "$file")"; then
wrapProgram "$file" \
--prefix PYTHONPATH : ${stdenv.lib.concatStringsSep ":"
(map (path: "$(toPythonPath ${path})") extraPackages)} \
--prefix GRC_BLOCKS_PATH : ${makeSearchPath "share/gnuradio/grc/blocks" extraPackages}
fi
done
'';
inherit (gnuradio) meta;
}