From 5d75dbe5e597e14327247fb5a59ba4859e06c9fa Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 10 Nov 2017 18:26:09 -0600 Subject: [PATCH] gnuradio: Resolve darwin c++11 issues -std=c++11 causes errors with OBJ-C files on Darwin. Inject dynamic compiler flag into every cmake file to work around this. --- pkgs/applications/misc/gnuradio/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index 058c8a8d9451..ec6346781d9b 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -67,9 +67,10 @@ stdenv.mkDerivation rec { # patch wxgui and pygtk check due to python importerror in a headless environment preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable -std=c++11" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable ${stdenv.lib.optionalString (!stdenv.isDarwin) "-std=c++11"}" sed -i 's/.*wx\.version.*/set(WX_FOUND TRUE)/g' gr-wxgui/CMakeLists.txt sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt + find . -name "CMakeLists.txt" -exec sed -i '1iadd_compile_options($<$:-std=c++11>)' "{}" ";" ''; # Framework path needed for qwt6_qt4 but not qwt5