mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 06:31:02 +00:00
24 lines
654 B
Nix
24 lines
654 B
Nix
|
{ stdenv, gnuradio, makeWrapper, python
|
||
|
, extraPackages ? [] }:
|
||
|
|
||
|
with stdenv.lib;
|
||
|
|
||
|
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 "$out"/bin/*; do
|
||
|
wrapProgram "$file" \
|
||
|
--prefix PYTHONPATH : ${stdenv.lib.concatStringsSep ":"
|
||
|
(map (path: "$(toPythonPath ${path})") extraPackages)} \
|
||
|
--prefix GRC_BLOCKS_PATH : ${makeSearchPath "share/gnuradio/grc/blocks" extraPackages}
|
||
|
done
|
||
|
|
||
|
'';
|
||
|
inherit (gnuradio) meta;
|
||
|
}
|