diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/radio/gnuradio/3.7.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/radio/gnuradio/3.7.nix | 55 |
1 files changed, 22 insertions, 33 deletions
diff --git a/nixpkgs/pkgs/applications/radio/gnuradio/3.7.nix b/nixpkgs/pkgs/applications/radio/gnuradio/3.7.nix index a48efb9aa6d9..50993dd6f8ef 100644 --- a/nixpkgs/pkgs/applications/radio/gnuradio/3.7.nix +++ b/nixpkgs/pkgs/applications/radio/gnuradio/3.7.nix @@ -5,6 +5,7 @@ # Remove gcc and python references , removeReferencesTo , pkg-config +, volk , cppunit , swig , orc @@ -43,11 +44,12 @@ minor = "14"; patch = "0"; } -, fetchSubmodules ? true +# We use our build of volk and not the one bundled with the release +, fetchSubmodules ? false }: let - sourceSha256 = "1nh4f9dmygprlbqybd3j1byg9fsr6065n140mvc4b0v8qqygmhrc"; + sourceSha256 = "BiUDibXV/5cEYmAAaIxT4WTxF/ni4MJumF5oJ/vuOyc="; featuresInfo = { # Needed always basic = { @@ -61,6 +63,9 @@ let }; volk = { cmakeEnableFlag = "VOLK"; + runtime = [ + volk + ]; }; doxygen = { native = [ doxygen ]; @@ -213,19 +218,29 @@ let qt = qt4; gtk = gtk2; }); + inherit (shared) hasFeature; # function +in + +stdenv.mkDerivation rec { + inherit pname; inherit (shared) version src - hasFeature # function nativeBuildInputs buildInputs disallowedReferences postInstall - passthru doCheck dontWrapPythonPrograms meta ; + + passthru = shared.passthru // { + # Deps that are potentially overriden and are used inside GR plugins - the same version must + inherit boost volk; + } // lib.optionalAttrs (hasFeature "gr-uhd" features) { + inherit uhd; + }; cmakeFlags = shared.cmakeFlags # From some reason, if these are not set, libcodec2 and gsm are # not detected properly (slightly different then what's in @@ -236,6 +251,9 @@ let "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so" "-DLIBGSM_INCLUDE_DIR=${gsm}/include/gsm" ] + ++ lib.optionals (hasFeature "volk" features && volk != null) [ + "-DENABLE_INTERNAL_VOLK=OFF" + ] ; stripDebugList = shared.stripDebugList # gr-fcd feature was dropped in 3.8 @@ -250,15 +268,6 @@ let + lib.optionalString (hasFeature "gnuradio-companion" features) '' sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt '' - # If python-support is disabled, don't install volk's (git submodule) - # volk_modtool - it references python. - # - # NOTE: The same is done for 3.8, but we don't put this string in - # ./shared.nix since on the next release of 3.8 it won't be needed there, - # but it will be needed for 3.7, probably for ever. - + lib.optionalString (!hasFeature "python-support" features) '' - sed -i -e "/python\/volk_modtool/d" volk/CMakeLists.txt - '' ; patches = [ # Don't install python referencing files if python support is disabled. @@ -272,24 +281,4 @@ let sha256 = "2Pitgu8accs16B5X5+/q51hr+IY9DMsA15f56gAtBs8="; }) ]; -in - -stdenv.mkDerivation rec { - inherit - pname - version - src - nativeBuildInputs - buildInputs - cmakeFlags - preConfigure - # disallowedReferences - stripDebugList - patches - postInstall - passthru - doCheck - dontWrapPythonPrograms - meta - ; } |