gnuradio: setupHook: enable composition with nix-shell

This commit is contained in:
Luke Adams 2017-07-14 18:34:29 -05:00
parent 482d8de3b0
commit 17908a7de1

@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper
{ stdenv, fetchurl, writeText, makeWrapper
# Dependencies documented @ https://gnuradio.org/doc/doxygen/build_guide.html
# => core dependencies
, cmake, pkgconfig, git, boost, cppunit, fftw
@ -55,6 +55,16 @@ stdenv.mkDerivation rec {
--replace BOOST_CONSTEXPR_OR_CONST const
'';
# Enables composition with nix-shell
grcSetupHook = writeText "grcSetupHook.sh" ''
addGRCBlocksPath() {
addToSearchPath GRC_BLOCKS_PATH $1/share/gnuradio/grc/blocks
}
envHooks+=(addGRCBlocksPath)
'';
setupHook = [ grcSetupHook ];
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable -std=c++11"
'';