gnuradio: setupHook: enable composition with nix-shell
This commit is contained in:
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
|
# Dependencies documented @ https://gnuradio.org/doc/doxygen/build_guide.html
|
||||||
# => core dependencies
|
# => core dependencies
|
||||||
, cmake, pkgconfig, git, boost, cppunit, fftw
|
, cmake, pkgconfig, git, boost, cppunit, fftw
|
||||||
@ -55,6 +55,16 @@ stdenv.mkDerivation rec {
|
|||||||
--replace BOOST_CONSTEXPR_OR_CONST const
|
--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 = ''
|
preConfigure = ''
|
||||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable -std=c++11"
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable -std=c++11"
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user