mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 13:19:10 +03:00
022527a5e1
gnuradio-wrapper is a simple derivation wrapping $(gnuradio)/bin/* to make other blocks (from `extraPackages') available. gnuradio-full uses gnuradio-wrapper to build gnuradio with blocks from gnuradio-osmosdr (therefore allowing the use of rtl-sdr, hackrf, the ccc-camp2015 badge, and similar).
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;
|
|
}
|