diff options
author | Doron Behar <doron.behar@gmail.com> | 2021-10-27 09:49:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 09:49:51 +0000 |
commit | a63cd4a89e7a4a300c2b6e0d9a1863c08ec055c6 (patch) | |
tree | 59c373d70cd2abd7a557887787f9b1a33196759c /pkgs/applications/radio | |
parent | 66f62494d653844ddd56bbe88c86b037eb344a56 (diff) | |
parent | e038cc7ff1778211d7c6ca247ac142b4f389233b (diff) |
Merge pull request #142557 from doronbehar/pkg/gnuradio/update
Diffstat (limited to 'pkgs/applications/radio')
-rw-r--r-- | pkgs/applications/radio/gnss-sdr/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/radio/gnuradio/3.7.nix | 15 | ||||
-rw-r--r-- | pkgs/applications/radio/gnuradio/3.8.nix | 49 | ||||
-rw-r--r-- | pkgs/applications/radio/gnuradio/default.nix | 49 | ||||
-rw-r--r-- | pkgs/applications/radio/gnuradio/modtool-newmod-permissions.3_8.patch | 26 | ||||
-rw-r--r-- | pkgs/applications/radio/gnuradio/modtool-newmod-permissions.patch | 15 | ||||
-rw-r--r-- | pkgs/applications/radio/gnuradio/shared.nix | 24 | ||||
-rw-r--r-- | pkgs/applications/radio/gnuradio/wrapper.nix | 21 | ||||
-rw-r--r-- | pkgs/applications/radio/gqrx/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/radio/inspectrum/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/radio/qradiolink/default.nix | 4 |
11 files changed, 156 insertions, 61 deletions
diff --git a/pkgs/applications/radio/gnss-sdr/default.nix b/pkgs/applications/radio/gnss-sdr/default.nix index 44a8ed14c2ec2..479b3b641cd37 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 @@ -21,6 +22,8 @@ gnuradio3_8.pkgs.mkDerivation rec { pname = "gnss-sdr"; + # There's an issue with cpufeatures on 0.0.15, see: + # https://github.com/NixOS/nixpkgs/pull/142557#issuecomment-950217925 version = "0.0.13"; src = fetchFromGitHub { @@ -56,6 +59,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.7.nix b/pkgs/applications/radio/gnuradio/3.7.nix index 3e423e025b76e..372300895ca28 100644 --- a/pkgs/applications/radio/gnuradio/3.7.nix +++ b/pkgs/applications/radio/gnuradio/3.7.nix @@ -44,8 +44,6 @@ minor = "14"; patch = "0"; } -# We use our build of volk and not the one bundled with the release -, fetchSubmodules ? false }: let @@ -213,7 +211,6 @@ let sourceSha256 overrideSrc fetchFromGitHub - fetchSubmodules ; qt = qt4; gtk = gtk2; @@ -238,34 +235,34 @@ stdenv.mkDerivation rec { 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) { + } // lib.optionalAttrs (hasFeature "gr-uhd") { 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 # ./default.nix). - ++ lib.optionals (hasFeature "gr-vocoder" features) [ + ++ lib.optionals (hasFeature "gr-vocoder") [ "-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so" "-DLIBCODEC2_INCLUDE_DIR=${codec2}/include" "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so" "-DLIBGSM_INCLUDE_DIR=${gsm}/include/gsm" ] - ++ lib.optionals (hasFeature "volk" features && volk != null) [ + ++ lib.optionals (hasFeature "volk" && volk != null) [ "-DENABLE_INTERNAL_VOLK=OFF" ] ; stripDebugList = shared.stripDebugList # gr-fcd feature was dropped in 3.8 - ++ lib.optionals (hasFeature "gr-fcd" features) [ "share/gnuradio/examples/fcd" ] + ++ lib.optionals (hasFeature "gr-fcd") [ "share/gnuradio/examples/fcd" ] ; preConfigure = "" # wxgui and pygtk are not looked up properly, so we force them to be # detected as found, if they are requested by the `features` attrset. - + lib.optionalString (hasFeature "gr-wxgui" features) '' + + lib.optionalString (hasFeature "gr-wxgui") '' sed -i 's/.*wx\.version.*/set(WX_FOUND TRUE)/g' gr-wxgui/CMakeLists.txt '' - + lib.optionalString (hasFeature "gnuradio-companion" features) '' + + lib.optionalString (hasFeature "gnuradio-companion") '' sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt '' ; diff --git a/pkgs/applications/radio/gnuradio/3.8.nix b/pkgs/applications/radio/gnuradio/3.8.nix index 05a87a480f398..0e5b7701e9871 100644 --- a/pkgs/applications/radio/gnuradio/3.8.nix +++ b/pkgs/applications/radio/gnuradio/3.8.nix @@ -1,5 +1,6 @@ { lib, stdenv , fetchFromGitHub +, fetchpatch , cmake # Remove gcc and python references , removeReferencesTo @@ -15,6 +16,7 @@ , python , codec2 , gsm +, thrift , fftwFloat , alsa-lib , libjack2 @@ -41,15 +43,13 @@ , pname ? "gnuradio" , versionAttr ? { major = "3.8"; - minor = "3"; - patch = "1"; + minor = "4"; + patch = "0"; } -# We use our build of volk and not the one bundled with the release -, fetchSubmodules ? false }: let - sourceSha256 = "0vd39azp8n576dbqsanax7bgsnxwc80riaxid2ihxs4xzyjmbw9r"; + sourceSha256 = "sha256-C8S3iF7vj9A8SpxriW9y7idrhXzonvenoQtVAMex+Iw="; featuresInfo = { # Needed always basic = { @@ -65,7 +65,7 @@ let ] # when gr-qtgui is disabled, icu needs to be included, otherwise # building with boost 1.7x fails - ++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ]; + ++ lib.optionals (!(hasFeature "gr-qtgui")) [ icu ]; pythonNative = with python.pkgs; [ Mako six @@ -101,13 +101,19 @@ 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 + ]; }; gnuradio-companion = { pythonRuntime = with python.pkgs; [ @@ -171,9 +177,14 @@ let }; gr-utils = { cmakeEnableFlag = "GR_UTILS"; + pythonRuntime = with python.pkgs; [ + # For gr_plot + matplotlib + ]; }; gr-modtool = { pythonRuntime = with python.pkgs; [ + setuptools click click-plugins ]; @@ -208,7 +219,6 @@ let sourceSha256 overrideSrc fetchFromGitHub - fetchSubmodules ; qt = qt5; gtk = gtk3; @@ -230,12 +240,21 @@ stdenv.mkDerivation rec { dontWrapQtApps meta ; + patches = [ + # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227 + ./modtool-newmod-permissions.3_8.patch + (fetchpatch { + # https://github.com/gnuradio/gnuradio/pull/5226 + url = "https://github.com/gnuradio/gnuradio/commit/9d7343526dd793120b6425cd9a6969416ed32503.patch"; + sha256 = "sha256-usSoRDDuClUfdX4yFbQNu8wDzve6UEhZYTFj1oZbFic="; + }) + ]; 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) { + } // lib.optionalAttrs (hasFeature "gr-uhd") { inherit uhd; - } // lib.optionalAttrs (hasFeature "gr-qtgui" features) { + } // lib.optionalAttrs (hasFeature "gr-qtgui") { inherit (libsForQt5) qwt; }; cmakeFlags = shared.cmakeFlags @@ -246,7 +265,7 @@ stdenv.mkDerivation rec { # # NOTE: qradiolink needs libcodec2 to be detected in # order to build, see https://github.com/qradiolink/qradiolink/issues/67 - ++ lib.optionals (hasFeature "gr-vocoder" features) [ + ++ lib.optionals (hasFeature "gr-vocoder") [ "-DLIBCODEC2_FOUND=TRUE" "-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so" "-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include" @@ -255,7 +274,7 @@ stdenv.mkDerivation rec { "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so" "-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm" ] - ++ lib.optionals (hasFeature "volk" features && volk != null) [ + ++ lib.optionals (hasFeature "volk" && volk != null) [ "-DENABLE_INTERNAL_VOLK=OFF" ] ; @@ -263,7 +282,7 @@ stdenv.mkDerivation rec { postInstall = shared.postInstall # This is the only python reference worth removing, if needed (3.7 doesn't # set that reference). - + lib.optionalString (!hasFeature "python-support" features) '' + + lib.optionalString (!hasFeature "python-support") '' ${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake '' ; diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index c62b031d8133f..d92af80701b1a 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 @@ -45,14 +46,13 @@ , pname ? "gnuradio" , versionAttr ? { major = "3.9"; - minor = "2"; + minor = "3"; patch = "0"; } -, fetchSubmodules ? false }: let - sourceSha256 = "01wyqazrpphmb0fl69j93k0w4vm4d1l4177m1fyg7qx8hzia0aaq"; + sourceSha256 = "sha256-jVfExv1CcnlOaaj/XtnfhWAHnQsshZJ1l/zXo0uovdo="; featuresInfo = { # Needed always basic = { @@ -69,7 +69,7 @@ let ] # when gr-qtgui is disabled, icu needs to be included, otherwise # building with boost 1.7x fails - ++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ]; + ++ lib.optionals (!(hasFeature "gr-qtgui")) [ icu ]; pythonNative = with python.pkgs; [ Mako six @@ -100,11 +100,15 @@ 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 ]; cmakeEnableFlag = "GR_CTRLPORT"; }; @@ -140,6 +144,10 @@ let gr-filter = { runtime = [ fftwFloat ]; cmakeEnableFlag = "GR_FILTER"; + pythonRuntime = with python.pkgs; [ + scipy + pyqtgraph + ]; }; gr-analog = { cmakeEnableFlag = "GR_ANALOG"; @@ -174,11 +182,22 @@ let ]; cmakeEnableFlag = "GR_UHD"; }; + gr-uhd-rfnoc = { + runtime = [ + uhd + ]; + cmakeEnableFlag = "UHD_RFNOC"; + }; gr-utils = { cmakeEnableFlag = "GR_UTILS"; + pythonRuntime = with python.pkgs; [ + # For gr_plot + matplotlib + ]; }; gr-modtool = { pythonRuntime = with python.pkgs; [ + setuptools click click-plugins ]; @@ -225,7 +244,6 @@ let sourceSha256 overrideSrc fetchFromGitHub - fetchSubmodules ; qt = qt5; gtk = gtk3; @@ -248,18 +266,27 @@ stdenv.mkDerivation rec { dontWrapQtApps meta ; + patches = [ + # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227 + ./modtool-newmod-permissions.patch + (fetchpatch { + # https://github.com/gnuradio/gnuradio/pull/5225 + url = "https://github.com/gnuradio/gnuradio/commit/4cef46e3ea0faf04e05ca1a5846cd1568fa51bb2.patch"; + sha256 = "sha256-6AlGbtD1S0c3I9JSoLTMP4YqwDU17i2j+XRkuR+QTuc="; + }) + ]; 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) { + } // lib.optionalAttrs (hasFeature "gr-uhd") { inherit uhd; - } // lib.optionalAttrs (hasFeature "gr-qtgui" features) { + } // lib.optionalAttrs (hasFeature "gr-qtgui") { inherit (libsForQt5) qwt; }; postInstall = shared.postInstall # This is the only python reference worth removing, if needed. - + lib.optionalString (!hasFeature "python-support" features) '' + + lib.optionalString (!hasFeature "python-support") '' ${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) ${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake diff --git a/pkgs/applications/radio/gnuradio/modtool-newmod-permissions.3_8.patch b/pkgs/applications/radio/gnuradio/modtool-newmod-permissions.3_8.patch new file mode 100644 index 0000000000000..f6a6a06e89c47 --- /dev/null +++ b/pkgs/applications/radio/gnuradio/modtool-newmod-permissions.3_8.patch @@ -0,0 +1,26 @@ +commit bf870157e0a9c3d19e968afb276b4e7d96b4df30 +Author: Doron Behar <doron.behar@gmail.com> +Date: Thu Oct 21 13:10:42 2021 +0300 + + gr-modtool: Don't copy source permissions + + This is needed for systems such as NixOS, where the build tree isn't + writable and the files copied should be. + + Signed-off-by: Doron Behar <doron.behar@gmail.com> + +diff --git a/gr-utils/python/modtool/core/newmod.py b/gr-utils/python/modtool/core/newmod.py +index 123059907..0c734e7ae 100644 +--- a/gr-utils/python/modtool/core/newmod.py ++++ b/gr-utils/python/modtool/core/newmod.py +@@ -78,7 +78,9 @@ class ModToolNewModule(ModTool): + self._setup_scm(mode='new') + logger.info("Creating out-of-tree module in {}...".format(self.dir)) + try: +- shutil.copytree(self.srcdir, self.dir) ++ # https://stackoverflow.com/a/17022146/4935114 ++ shutil.copystat = lambda x, y: x ++ shutil.copytree(self.srcdir, self.dir, copy_function=shutil.copyfile) + os.chdir(self.dir) + except OSError: + raise ModToolException('Could not create directory {}.'.format(self.dir)) diff --git a/pkgs/applications/radio/gnuradio/modtool-newmod-permissions.patch b/pkgs/applications/radio/gnuradio/modtool-newmod-permissions.patch new file mode 100644 index 0000000000000..7cab73fede0cc --- /dev/null +++ b/pkgs/applications/radio/gnuradio/modtool-newmod-permissions.patch @@ -0,0 +1,15 @@ +diff --git c/gr-utils/modtool/core/newmod.py w/gr-utils/modtool/core/newmod.py +index babebfcde..9a02f663e 100644 +--- c/gr-utils/modtool/core/newmod.py ++++ w/gr-utils/modtool/core/newmod.py +@@ -62,7 +62,9 @@ class ModToolNewModule(ModTool): + self._setup_scm(mode='new') + logger.info(f"Creating out-of-tree module in {self.dir}...") + try: +- shutil.copytree(self.srcdir, self.dir) ++ # https://stackoverflow.com/a/17022146/4935114 ++ shutil.copystat = lambda x, y: x ++ shutil.copytree(self.srcdir, self.dir, copy_function=shutil.copyfile) + try: + shutil.copyfile(os.path.join(gr.prefix(), 'share', 'gnuradio', 'clang-format.conf'), + os.path.join(self.dir, '.clang-format')) diff --git a/pkgs/applications/radio/gnuradio/shared.nix b/pkgs/applications/radio/gnuradio/shared.nix index f8ea2f0b16018..ea97864bc6155 100644 --- a/pkgs/applications/radio/gnuradio/shared.nix +++ b/pkgs/applications/radio/gnuradio/shared.nix @@ -11,7 +11,6 @@ # the main expressions , overrideSrc , fetchFromGitHub -, fetchSubmodules }: rec { @@ -26,12 +25,11 @@ rec { owner = "gnuradio"; rev = "v${version}"; sha256 = sourceSha256; - inherit fetchSubmodules; } ; # Check if a feature is enabled, while defaulting to true if feat is not # specified. - hasFeature = feat: features: ( + hasFeature = feat: ( if builtins.hasAttr feat features then features.${feat} else @@ -39,7 +37,7 @@ rec { ); nativeBuildInputs = lib.flatten (lib.mapAttrsToList ( feat: info: ( - if hasFeature feat features then + if hasFeature feat then (if builtins.hasAttr "native" info then info.native else []) ++ (if builtins.hasAttr "pythonNative" info then info.pythonNative else []) else @@ -48,7 +46,7 @@ rec { ) featuresInfo); buildInputs = lib.flatten (lib.mapAttrsToList ( feat: info: ( - if hasFeature feat features then + if hasFeature feat then (if builtins.hasAttr "runtime" info then info.runtime else []) ++ (if builtins.hasAttr "pythonRuntime" info then info.pythonRuntime else []) else @@ -63,7 +61,7 @@ rec { # satisfied, let only our cmakeFlags decide. "-DENABLE_DEFAULT=OFF" else - if hasFeature feat features then + if hasFeature feat then "-DENABLE_${info.cmakeEnableFlag}=ON" else "-DENABLE_${info.cmakeEnableFlag}=OFF" @@ -75,17 +73,17 @@ rec { stdenv.cc.cc ] # If python-support is disabled, we probably don't want it referenced - ++ lib.optionals (!hasFeature "python-support" features) [ python ] + ++ lib.optionals (!hasFeature "python-support") [ python ] ; # Gcc references from examples stripDebugList = [ "lib" "bin" ] - ++ lib.optionals (hasFeature "gr-audio" features) [ "share/gnuradio/examples/audio" ] - ++ lib.optionals (hasFeature "gr-uhd" features) [ "share/gnuradio/examples/uhd" ] - ++ lib.optionals (hasFeature "gr-qtgui" features) [ "share/gnuradio/examples/qt-gui" ] + ++ lib.optionals (hasFeature "gr-audio") [ "share/gnuradio/examples/audio" ] + ++ lib.optionals (hasFeature "gr-uhd") [ "share/gnuradio/examples/uhd" ] + ++ lib.optionals (hasFeature "gr-qtgui") [ "share/gnuradio/examples/qt-gui" ] ; postInstall = "" # Gcc references - + lib.optionalString (hasFeature "gnuradio-runtime" features) '' + + lib.optionalString (hasFeature "gnuradio-runtime") '' ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime.so) '' ; @@ -101,9 +99,9 @@ rec { featuresInfo python ; - } // lib.optionalAttrs (hasFeature "gr-qtgui" features) { + } // lib.optionalAttrs (hasFeature "gr-qtgui") { inherit qt; - } // lib.optionalAttrs (hasFeature "gnuradio-companion" features) { + } // lib.optionalAttrs (hasFeature "gnuradio-companion") { inherit gtk; }; # Wrapping is done with an external wrapper diff --git a/pkgs/applications/radio/gnuradio/wrapper.nix b/pkgs/applications/radio/gnuradio/wrapper.nix index 7dcb6d467d62f..4cbccbd51819c 100644 --- a/pkgs/applications/radio/gnuradio/wrapper.nix +++ b/pkgs/applications/radio/gnuradio/wrapper.nix @@ -33,25 +33,20 @@ }: let + # We don't check if `python-support` feature is on, as it's unlikely someone + # may wish to wrap GR without python support. pythonPkgs = extraPythonPackages + ++ [ (unwrapped.python.pkgs.toPythonModule unwrapped) ] # Add the extraPackages as python modules as well ++ (builtins.map unwrapped.python.pkgs.toPythonModule extraPackages) ++ lib.flatten (lib.mapAttrsToList ( feat: info: ( - if unwrapped.hasFeature feat unwrapped.features then + if unwrapped.hasFeature feat then (if builtins.hasAttr "pythonRuntime" info then info.pythonRuntime else []) else [] ) ) unwrapped.featuresInfo) - ++ lib.optionals - (unwrapped.hasFeature "python-support" unwrapped.features) - ( - # Add unwrapped itself as a python module - [ (unwrapped.python.pkgs.toPythonModule unwrapped) ] - # Add all extraPackages as python modules - ++ (builtins.map unwrapped.python.pkgs.toPythonModule extraPackages) - ) ; pythonEnv = unwrapped.python.withPackages(ps: pythonPkgs); @@ -60,8 +55,8 @@ let ] # Emulating wrapGAppsHook & wrapQtAppsHook working together ++ lib.optionals ( - (unwrapped.hasFeature "gnuradio-companion" unwrapped.features) - || (unwrapped.hasFeature "gr-qtgui" unwrapped.features) + (unwrapped.hasFeature "gnuradio-companion") + || (unwrapped.hasFeature "gr-qtgui") ) [ "--prefix" "XDG_DATA_DIRS" ":" "$out/share" "--prefix" "XDG_DATA_DIRS" ":" "$out/share/gsettings-schemas/${name}" @@ -71,7 +66,7 @@ let # https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1764890.html "--prefix" "PATH" ":" "${lib.getBin glib}/bin" ] - ++ lib.optionals (unwrapped.hasFeature "gnuradio-companion" unwrapped.features) [ + ++ lib.optionals (unwrapped.hasFeature "gnuradio-companion") [ "--set" "GDK_PIXBUF_MODULE_FILE" "${librsvg}/${gdk-pixbuf.moduleDir}.cache" "--prefix" "GIO_EXTRA_MODULES" ":" "${lib.getLib dconf}/lib/gio/modules" "--prefix" "XDG_DATA_DIRS" ":" "${unwrapped.gtk}/share" @@ -94,7 +89,7 @@ let ++ lib.optionals (extraPackages != []) [ "--prefix" "GRC_BLOCKS_PATH" ":" "${lib.makeSearchPath "share/gnuradio/grc/blocks" extraPackages}" ] - ++ lib.optionals (unwrapped.hasFeature "gr-qtgui" unwrapped.features) + ++ lib.optionals (unwrapped.hasFeature "gr-qtgui") # 3.7 builds with qt4 (if lib.versionAtLeast unwrapped.versionAttr.major "3.8" then [ diff --git a/pkgs/applications/radio/gqrx/default.nix b/pkgs/applications/radio/gqrx/default.nix index 272c381db8972..83d2786c7b7ac 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 9d61ab4b60197..0f0b89d431656 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 2f31761537d00..31be8f4fb8b64 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 |