diff options
| author | Eduardo Sánchez Muñoz <esm@eduardosm.net> | 2021-06-28 12:45:48 +0200 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2021-06-29 11:13:30 +0000 |
| commit | d9102c8acabebd44e17fa86b86a5c784b65fd141 (patch) | |
| tree | ce7e99dea2c6e3cf339f2ba6f4e66312a3f9ef43 | |
| parent | Merge pull request #128596 from NixOS/backport-128520-to-release-21.05 (diff) | |
| download | nixpkgs-origin/backport-128492-to-release-21.05.tar.gz | |
gnuradio: 3.9.1.0 -> 3.9.2.0origin/backport-128492-to-release-21.05
- Add sopysdr support.
- Remove some workarounds around upstream issues.
(cherry picked from commit a7260e81fc6b722a63641be5923b100ff646c8c8)
| -rw-r--r-- | pkgs/applications/radio/gnuradio/default.nix | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index d622fef424d2..32305f5b4cdb 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -22,6 +22,7 @@ , uhd , SDL , gsl +, soapysdr , libsodium , libsndfile , libunwind @@ -44,14 +45,14 @@ , pname ? "gnuradio" , versionAttr ? { major = "3.9"; - minor = "1"; + minor = "2"; patch = "0"; } , fetchSubmodules ? false }: let - sourceSha256 = "0zydmrr3gkaqiv4jv8f42awrfzs177bqb349q34rnr6j3d32z2vp"; + sourceSha256 = "01wyqazrpphmb0fl69j93k0w4vm4d1l4177m1fyg7qx8hzia0aaq"; featuresInfo = { # Needed always basic = { @@ -205,6 +206,12 @@ let gr-network = { cmakeEnableFlag = "GR_NETWORK"; }; + gr-soapy = { + cmakeEnableFlag = "GR_SOAPY"; + runtime = [ + soapysdr + ]; + }; }; shared = (import ./shared.nix { inherit @@ -233,6 +240,7 @@ stdenv.mkDerivation rec { src nativeBuildInputs buildInputs + cmakeFlags disallowedReferences stripDebugList doCheck @@ -248,25 +256,9 @@ 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" - ] - ; postInstall = shared.postInstall # This is the only python reference worth removing, if needed. - # Even if python support is enabled, and we don't care about this - # reference, pybind's path is not properly set. See: - # https://github.com/gnuradio/gnuradio/issues/4380 + lib.optionalString (!hasFeature "python-support" features) '' ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake ${removeReferencesTo}/bin/remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime.so) |
