gnuradio: fix wrapper
gnuradio-with-packages was not running makeWrapper on any of the symlinked executables because `find $out/bin -type f -executable` does not resolve symlinks. I don't understand how the old code ever worked on any system.
This commit is contained in:
parent
4db7c04160
commit
dc5bdf22d9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user