From 7690f9a312e49e56b6df443169e5bf2ea420e0a7 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 24 Feb 2021 23:03:45 +0200 Subject: [PATCH] gnuradio, uhd: Use boost17x gnss-sdr needs it: https://github.com/boostorg/format/issues/67 . uhd and gnuradio need to use the same boost version to avoid incompatibilities issues. icu is needed from some reason with boost17x. --- pkgs/applications/radio/gnuradio/default.nix | 18 ++++++++++++++++-- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index 9bc1511968be..f8fc1fa10f85 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -24,6 +24,8 @@ , gsl , cppzmq , zeromq +# Needed only if qt-gui is disabled, from some reason +, icu # GUI related , gtk3 , pango @@ -60,7 +62,10 @@ let boost log4cpp mpir - ]; + ] + # when gr-qtgui is disabled, icu needs to be included, otherwise + # building with boost 1.7x fails + ++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ]; pythonNative = with python.pkgs; [ Mako six @@ -160,7 +165,9 @@ let cmakeEnableFlag = "GR_TRELLIS"; }; gr-uhd = { - runtime = [ uhd ]; + runtime = [ + uhd + ]; cmakeEnableFlag = "GR_UHD"; }; gr-utils = { @@ -265,6 +272,13 @@ let url = "https://github.com/gnuradio/gnuradio/commit/dbc8ad7e7361fddc7b1dbc267c07a776a3f9664b.diff"; sha256 = "tQcCpcUbJv3yqAX8rSHN/pAuBq4ueEvoVo7sNzZGvf4="; }) + # Needed to use boost 1.7x, see: + # https://github.com/gnuradio/gnuradio/issues/3720 + # https://github.com/gnuradio/gnuradio/pull/3967 + (fetchpatch { + url = "https://github.com/gnuradio/gnuradio/commit/cbcb968358fad56f3646619b258f18b0e6693a07.diff"; + sha256 = "1ajf4797f869lqv436xw61s29qdbn7f01i0970kfxv3yahd34p9v"; + }) ]; in diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c5fb1cafbc1b..97da2fa1699e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13142,7 +13142,9 @@ in uefi-firmware-parser = callPackage ../development/tools/analysis/uefi-firmware-parser { }; uhd3_5 = callPackage ../applications/radio/uhd/3.5.nix { }; - uhd = callPackage ../applications/radio/uhd { }; + uhd = callPackage ../applications/radio/uhd { + boost = boost17x; + }; uisp = callPackage ../development/tools/misc/uisp { }; @@ -22337,6 +22339,7 @@ in gnuradio-unwrapped = callPackage ../applications/radio/gnuradio { inherit (darwin.apple_sdk.frameworks) CoreAudio; python = python3; + boost = boost17x; }; # A build without gui components and other utilites not needed for end user # libraries