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.

+10 -9
+10 -9
pkgs/applications/misc/gnuradio/wrapper.nix
··· 1 - { stdenv, gnuradio, makeWrapper, python 2 - , extraPackages ? [] }: 1 + { stdenv, gnuradio, makeWrapper, python, extraPackages ? [] }: 3 2 4 - with stdenv.lib; 3 + with { inherit (stdenv.lib) appendToName makeSearchPath; }; 5 4 6 5 stdenv.mkDerivation { 7 6 name = (appendToName "with-packages" gnuradio).name; ··· 11 10 mkdir -p $out/bin 12 11 ln -s "${gnuradio}"/bin/* $out/bin/ 13 12 14 - for file in $(find $out/bin -type f -executable); do 15 - wrapProgram "$file" \ 16 - --prefix PYTHONPATH : ${stdenv.lib.concatStringsSep ":" 17 - (map (path: "$(toPythonPath ${path})") extraPackages)} \ 18 - --prefix GRC_BLOCKS_PATH : ${makeSearchPath "share/gnuradio/grc/blocks" extraPackages} 13 + for file in $(find -L $out/bin -type f); do 14 + if test -x "$(readlink -f "$file")"; then 15 + wrapProgram "$file" \ 16 + --prefix PYTHONPATH : ${stdenv.lib.concatStringsSep ":" 17 + (map (path: "$(toPythonPath ${path})") extraPackages)} \ 18 + --prefix GRC_BLOCKS_PATH : ${makeSearchPath "share/gnuradio/grc/blocks" extraPackages} 19 + fi 19 20 done 20 - 21 21 ''; 22 + 22 23 inherit (gnuradio) meta; 23 24 }