mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
Merge pull request #34593 from taktoa/taktoa/gnuradio-wrapper-fix
gnuradio: fix wrapper
This commit is contained in:
commit
2bff46d193
@ -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