From 24abc4bfc475e100bc4c1cc5120474ff7050e124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20S=C3=A1nchez=20Mu=C3=B1oz?= Date: Fri, 2 Apr 2021 19:48:46 +0200 Subject: [PATCH 1/2] gnuradio: 3.9.0.0 -> 3.9.1.0 --- pkgs/applications/radio/gnuradio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index bcb2560144a..13b498e9c46 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -44,14 +44,14 @@ , pname ? "gnuradio" , versionAttr ? { major = "3.9"; - minor = "0"; + minor = "1"; patch = "0"; } , fetchSubmodules ? false }: let - sourceSha256 = "ZjQzioAuWrd8jsYOnLNH1mK4n9EbrjgvPX3mTzVFdLk="; + sourceSha256 = "0zydmrr3gkaqiv4jv8f42awrfzs177bqb349q34rnr6j3d32z2vp"; featuresInfo = { # Needed always basic = { From 6242f38c3058f5a9136b357d0fa0598c18bd5cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20S=C3=A1nchez=20Mu=C3=B1oz?= Date: Sat, 3 Apr 2021 14:47:43 +0200 Subject: [PATCH 2/2] gnuradio: enable gr-vocoder --- pkgs/applications/radio/gnuradio/default.nix | 26 +++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index 13b498e9c46..cb464bde16e 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -190,11 +190,10 @@ let runtime = [ SDL ]; cmakeEnableFlag = "GR_VIDEO_SDL"; }; - # codec2 and gsm support is broken with gr3.9: https://github.com/gnuradio/gnuradio/issues/4278 - # gr-vocoder = { - # runtime = [ codec2 gsm ]; - # cmakeEnableFlag = "GR_VOCODER"; - # }; + gr-vocoder = { + runtime = [ codec2 gsm ]; + cmakeEnableFlag = "GR_VOCODER"; + }; gr-wavelet = { cmakeEnableFlag = "GR_WAVELET"; runtime = [ gsl libsodium ]; @@ -234,7 +233,6 @@ stdenv.mkDerivation rec { src nativeBuildInputs buildInputs - cmakeFlags disallowedReferences stripDebugList doCheck @@ -250,6 +248,22 @@ stdenv.mkDerivation rec { } // lib.optionalAttrs (hasFeature "gr-qtgui" features) { inherit (libsForQt5) qwt; }; + cmakeFlags = shared.cmakeFlags + # From some reason, if these are not set, libcodec2 and gsm are not + # detected properly. + ++ lib.optionals (hasFeature "gr-vocoder" features) [ + "-DLIBCODEC2_FOUND=TRUE" + "-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so" + "-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include" + "-DLIBCODEC2_HAS_FREEDV_API=ON" + "-DLIBGSM_FOUND=TRUE" + "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so" + "-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm" + ] + ++ lib.optionals (hasFeature "volk" features && volk != null) [ + "-DENABLE_INTERNAL_VOLK=OFF" + ] + ; postInstall = shared.postInstall # This is the only python reference worth removing, if needed.