diff options
author | Elis Hirwing <elis@hirwing.se> | 2019-02-09 15:44:49 +0100 |
---|---|---|
committer | Elis Hirwing <elis@hirwing.se> | 2019-02-09 21:37:45 +0100 |
commit | 7524e06e28e588e507b559fc94c0c91aab56f4f6 (patch) | |
tree | 85baba9f2becce1b2b319793cd35645267f314d1 /pkgs/applications/radio/gnuradio/wrapper.nix | |
parent | 65d19fb3e55ad9fa99c438b158e316788bdaf82b (diff) |
gnuradio: Move from misc to radio
Diffstat (limited to 'pkgs/applications/radio/gnuradio/wrapper.nix')
-rw-r--r-- | pkgs/applications/radio/gnuradio/wrapper.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pkgs/applications/radio/gnuradio/wrapper.nix b/pkgs/applications/radio/gnuradio/wrapper.nix new file mode 100644 index 0000000000000..ffed3da03187e --- /dev/null +++ b/pkgs/applications/radio/gnuradio/wrapper.nix @@ -0,0 +1,24 @@ +{ stdenv, gnuradio, makeWrapper, python, extraPackages ? [] }: + +with { inherit (stdenv.lib) appendToName makeSearchPath; }; + +stdenv.mkDerivation { + name = (appendToName "with-packages" gnuradio).name; + buildInputs = [ makeWrapper python ]; + + buildCommand = '' + mkdir -p $out/bin + ln -s "${gnuradio}"/bin/* $out/bin/ + + 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; +} |