From 58025e85871f2509cb21fe06c326657f81227e84 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 21 Oct 2021 15:45:55 +0300 Subject: [PATCH] gnuradio: Reenable thrift support Apparently, this requires thrift to be added to all other reverse dependencies. --- pkgs/applications/radio/gnss-sdr/default.nix | 4 ++++ pkgs/applications/radio/gnuradio/3.8.nix | 8 +++++--- pkgs/applications/radio/gnuradio/default.nix | 6 +++--- pkgs/applications/radio/gqrx/default.nix | 4 ++++ pkgs/applications/radio/inspectrum/default.nix | 4 ++++ pkgs/applications/radio/qradiolink/default.nix | 4 ++++ pkgs/development/gnuradio-modules/limesdr/default.nix | 4 ++++ pkgs/development/gnuradio-modules/osmosdr/default.nix | 4 ++++ pkgs/development/gnuradio-modules/rds/default.nix | 4 ++++ pkgs/top-level/all-packages.nix | 6 ++++++ 10 files changed, 42 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/radio/gnss-sdr/default.nix b/pkgs/applications/radio/gnss-sdr/default.nix index 44a8ed14c2ec..894b23eb6145 100644 --- a/pkgs/applications/radio/gnss-sdr/default.nix +++ b/pkgs/applications/radio/gnss-sdr/default.nix @@ -8,6 +8,7 @@ , openssl , gflags , gnuradio3_8 +, thrift , libpcap , orc , pkg-config @@ -56,6 +57,9 @@ gnuradio3_8.pkgs.mkDerivation rec { protobuf gnuradio3_8.pkgs.osmosdr libpcap + ] ++ lib.optionals (gnuradio3_8.hasFeature "gr-ctrlport") [ + thrift + gnuradio3_8.unwrapped.python.pkgs.thrift ]; cmakeFlags = [ diff --git a/pkgs/applications/radio/gnuradio/3.8.nix b/pkgs/applications/radio/gnuradio/3.8.nix index 459072cb3be1..0e5b7701e987 100644 --- a/pkgs/applications/radio/gnuradio/3.8.nix +++ b/pkgs/applications/radio/gnuradio/3.8.nix @@ -16,6 +16,7 @@ , python , codec2 , gsm +, thrift , fftwFloat , alsa-lib , libjack2 @@ -100,14 +101,15 @@ let cmakeEnableFlag = "GNURADIO_RUNTIME"; }; gr-ctrlport = { - # Thrift support is not really working well, and even the patch they - # recommend applying on 0.9.2 won't apply. See: - # https://github.com/gnuradio/gnuradio/blob/v3.8.2.0/gnuradio-runtime/lib/controlport/thrift/README cmakeEnableFlag = "GR_CTRLPORT"; native = [ swig ]; + runtime = [ + thrift + ]; pythonRuntime = with python.pkgs; [ + python.pkgs.thrift # For gr-perf-monitorx matplotlib networkx diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index 08bad6683962..d92af80701b1 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -26,6 +26,7 @@ , libsodium , libsndfile , libunwind +, thrift , cppzmq , zeromq # Needed only if qt-gui is disabled, from some reason @@ -99,13 +100,12 @@ let ]; }; gr-ctrlport = { - # Thrift support is not really working well, and even the patch they - # recommend applying on 0.9.2 won't apply. See: - # https://github.com/gnuradio/gnuradio/blob/v3.9.0.0/gnuradio-runtime/lib/controlport/thrift/README runtime = [ libunwind + thrift ]; pythonRuntime = with python.pkgs; [ + python.pkgs.thrift # For gr-perf-monitorx matplotlib networkx diff --git a/pkgs/applications/radio/gqrx/default.nix b/pkgs/applications/radio/gqrx/default.nix index 272c381db897..83d2786c7b7a 100644 --- a/pkgs/applications/radio/gqrx/default.nix +++ b/pkgs/applications/radio/gqrx/default.nix @@ -4,6 +4,7 @@ , pkg-config , qt5 , gnuradio3_8Minimal +, thrift , log4cpp , mpir , fftwFloat @@ -45,6 +46,9 @@ gnuradio3_8Minimal.pkgs.mkDerivation rec { gnuradio3_8Minimal.pkgs.osmosdr rtl-sdr hackrf + ] ++ lib.optionals (gnuradio3_8Minimal.hasFeature "gr-ctrlport") [ + thrift + gnuradio3_8Minimal.unwrapped.python.pkgs.thrift ] ++ lib.optionals pulseaudioSupport [ libpulseaudio ]; postInstall = '' diff --git a/pkgs/applications/radio/inspectrum/default.nix b/pkgs/applications/radio/inspectrum/default.nix index 9d61ab4b6019..0f0b89d43165 100644 --- a/pkgs/applications/radio/inspectrum/default.nix +++ b/pkgs/applications/radio/inspectrum/default.nix @@ -1,5 +1,6 @@ { lib , gnuradio3_8Minimal +, thrift , fetchFromGitHub , pkg-config , cmake @@ -28,6 +29,9 @@ gnuradio3_8Minimal.pkgs.mkDerivation rec { fftwFloat liquid-dsp qt5.qtbase + ] ++ lib.optionals (gnuradio3_8Minimal.hasFeature "gr-ctrlport") [ + thrift + gnuradio3_8Minimal.unwrapped.python.pkgs.thrift ]; meta = with lib; { diff --git a/pkgs/applications/radio/qradiolink/default.nix b/pkgs/applications/radio/qradiolink/default.nix index 2f31761537d0..31be8f4fb8b6 100644 --- a/pkgs/applications/radio/qradiolink/default.nix +++ b/pkgs/applications/radio/qradiolink/default.nix @@ -4,6 +4,7 @@ , libconfig # Needs a gnuradio built with qt gui support , gnuradio3_8 +, thrift # Not gnuradioPackages' , codec2 , log4cpp @@ -61,6 +62,9 @@ gnuradio3_8.pkgs.mkDerivation rec { libftdi libsndfile gnuradio3_8.qwt + ] ++ lib.optionals (gnuradio3_8.hasFeature "gr-ctrlport") [ + thrift + gnuradio3_8.unwrapped.python.pkgs.thrift ]; nativeBuildInputs = [ protobuf diff --git a/pkgs/development/gnuradio-modules/limesdr/default.nix b/pkgs/development/gnuradio-modules/limesdr/default.nix index c10ab9df391e..f26e4695a10c 100644 --- a/pkgs/development/gnuradio-modules/limesdr/default.nix +++ b/pkgs/development/gnuradio-modules/limesdr/default.nix @@ -2,6 +2,7 @@ , mkDerivation , fetchFromGitHub , gnuradio +, thrift , cmake , pkg-config , doxygen @@ -49,6 +50,9 @@ in mkDerivation { gmp icu limesuite + ] ++ lib.optionals (gnuradio.hasFeature "gr-ctrlport") [ + thrift + python.pkgs.thrift ]; meta = with lib; { diff --git a/pkgs/development/gnuradio-modules/osmosdr/default.nix b/pkgs/development/gnuradio-modules/osmosdr/default.nix index de7cc8aa460b..ebb34afee101 100644 --- a/pkgs/development/gnuradio-modules/osmosdr/default.nix +++ b/pkgs/development/gnuradio-modules/osmosdr/default.nix @@ -8,6 +8,7 @@ , mpir , boost , gmp +, thrift , fftwFloat , python , swig @@ -54,6 +55,9 @@ in mkDerivation { soapysdr-with-plugins ] ++ lib.optionals (gnuradio.hasFeature "gr-uhd") [ uhd + ] ++ lib.optionals (gnuradio.hasFeature "gr-ctrlport") [ + thrift + python.pkgs.thrift ]; cmakeFlags = [ (if (gnuradio.hasFeature "python-support") then diff --git a/pkgs/development/gnuradio-modules/rds/default.nix b/pkgs/development/gnuradio-modules/rds/default.nix index c068d6af8105..6e651cdd7e0c 100644 --- a/pkgs/development/gnuradio-modules/rds/default.nix +++ b/pkgs/development/gnuradio-modules/rds/default.nix @@ -8,6 +8,7 @@ , python , log4cpp , mpir +, thrift , boost , gmp , icu @@ -40,6 +41,9 @@ in mkDerivation { boost gmp icu + ] ++ lib.optionals (gnuradio.hasFeature "gr-ctrlport") [ + thrift + python.pkgs.thrift ]; nativeBuildInputs = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 87e40fcd02aa..82bf902d39b4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24665,6 +24665,9 @@ with pkgs; gr-blocktool = false; sphinx = false; doxygen = false; + # Doesn't make it reference python eventually, but makes reverse + # depdendencies require python to use cmake files of GR. + gr-ctrlport = false; }; }; }; @@ -24693,6 +24696,9 @@ with pkgs; gr-modtool = false; sphinx = false; doxygen = false; + # Doesn't make it reference python eventually, but makes reverse + # depdendencies require python to use cmake files of GR. + gr-ctrlport = false; }; }; };