gnuradio: setupHook: enable composition with nix-shell

+11 -1
+11 -1
pkgs/applications/misc/gnuradio/default.nix
··· 1 - { stdenv, fetchurl, makeWrapper 1 + { stdenv, fetchurl, writeText, makeWrapper 2 2 # Dependencies documented @ https://gnuradio.org/doc/doxygen/build_guide.html 3 3 # => core dependencies 4 4 , cmake, pkgconfig, git, boost, cppunit, fftw ··· 54 54 gr-fec/include/gnuradio/fec/polar_decoder_common.h \ 55 55 --replace BOOST_CONSTEXPR_OR_CONST const 56 56 ''; 57 + 58 + # Enables composition with nix-shell 59 + grcSetupHook = writeText "grcSetupHook.sh" '' 60 + addGRCBlocksPath() { 61 + addToSearchPath GRC_BLOCKS_PATH $1/share/gnuradio/grc/blocks 62 + } 63 + envHooks+=(addGRCBlocksPath) 64 + ''; 65 + 66 + setupHook = [ grcSetupHook ]; 57 67 58 68 preConfigure = '' 59 69 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable -std=c++11"