diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2022-01-16 12:51:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-16 12:51:23 +0100 |
commit | 3a13cdf0c125d983b8ee429d99e5f06108d879ba (patch) | |
tree | bd32885398319fc999e5b18412959cd3d8ae5648 | |
parent | d0a7fc845df6ae2fc58dc0539361ca6082dbe138 (diff) | |
parent | 0823217739d553efdd8b98ea25e72c9dec25ff95 (diff) |
Merge pull request #155148 from doronbehar/pkg/gnuradio/update
gnuradio: 3.9 -> 3.10
-rw-r--r-- | pkgs/applications/radio/gnuradio/3.9.nix | 293 | ||||
-rw-r--r-- | pkgs/applications/radio/gnuradio/default.nix | 28 | ||||
-rw-r--r-- | pkgs/development/gnuradio-modules/grnet/default.nix | 1 | ||||
-rw-r--r-- | pkgs/development/gnuradio-modules/limesdr/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/gnuradio-modules/osmosdr/default.nix | 6 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 32 |
6 files changed, 351 insertions, 11 deletions
diff --git a/pkgs/applications/radio/gnuradio/3.9.nix b/pkgs/applications/radio/gnuradio/3.9.nix new file mode 100644 index 0000000000000..784ab7bd0fc23 --- /dev/null +++ b/pkgs/applications/radio/gnuradio/3.9.nix @@ -0,0 +1,293 @@ +{ lib, stdenv +, fetchFromGitHub +, fetchpatch +, cmake +# Remove gcc and python references +, removeReferencesTo +, pkg-config +, volk +, cppunit +, orc +, boost +, log4cpp +, mpir +, doxygen +, python +, codec2 +, gsm +, fftwFloat +, alsa-lib +, libjack2 +, CoreAudio +, uhd +, SDL +, gsl +, soapysdr +, libsodium +, libsndfile +, libunwind +, thrift +, cppzmq +, zeromq +# Needed only if qt-gui is disabled, from some reason +, icu +# GUI related +, gtk3 +, pango +, gobject-introspection +, cairo +, qt5 +, libsForQt5 +# Features available to override, the list of them is in featuresInfo. They +# are all turned on by default. +, features ? {} +# If one wishes to use a different src or name for a very custom build +, overrideSrc ? {} +, pname ? "gnuradio" +, versionAttr ? { + major = "3.9"; + minor = "5"; + patch = "0"; +} +}: + +let + sourceSha256 = "sha256-TWCXLoS+ImKNd2zkxMks4FXsQMvGKgcW5/MW8S1Y1TY="; + featuresInfo = { + # Needed always + basic = { + native = [ + cmake + pkg-config + orc + ]; + runtime = [ + volk + 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")) [ icu ]; + pythonNative = with python.pkgs; [ + Mako + six + ]; + }; + doxygen = { + native = [ doxygen ]; + cmakeEnableFlag = "DOXYGEN"; + }; + man-pages = { + cmakeEnableFlag = "MANPAGES"; + }; + python-support = { + pythonRuntime = [ python.pkgs.six ]; + native = [ + python + ]; + cmakeEnableFlag = "PYTHON"; + }; + testing-support = { + native = [ cppunit ]; + cmakeEnableFlag = "TESTING"; + }; + post-install = { + cmakeEnableFlag = "POSTINSTALL"; + }; + gnuradio-runtime = { + cmakeEnableFlag = "GNURADIO_RUNTIME"; + pythonRuntime = [ + python.pkgs.pybind11 + ]; + }; + gr-ctrlport = { + runtime = [ + libunwind + thrift + ]; + pythonRuntime = with python.pkgs; [ + python.pkgs.thrift + # For gr-perf-monitorx + matplotlib + networkx + ]; + cmakeEnableFlag = "GR_CTRLPORT"; + }; + gnuradio-companion = { + pythonRuntime = with python.pkgs; [ + pyyaml + Mako + numpy + pygobject3 + ]; + native = [ + python.pkgs.pytest + ]; + runtime = [ + gtk3 + pango + gobject-introspection + cairo + libsndfile + ]; + cmakeEnableFlag = "GRC"; + }; + gr-blocks = { + cmakeEnableFlag = "GR_BLOCKS"; + }; + gr-fec = { + cmakeEnableFlag = "GR_FEC"; + }; + gr-fft = { + runtime = [ fftwFloat ]; + cmakeEnableFlag = "GR_FFT"; + }; + gr-filter = { + runtime = [ fftwFloat ]; + cmakeEnableFlag = "GR_FILTER"; + pythonRuntime = with python.pkgs; [ + scipy + pyqtgraph + ]; + }; + gr-analog = { + cmakeEnableFlag = "GR_ANALOG"; + }; + gr-digital = { + cmakeEnableFlag = "GR_DIGITAL"; + }; + gr-dtv = { + cmakeEnableFlag = "GR_DTV"; + }; + gr-audio = { + runtime = [] + ++ lib.optionals stdenv.isLinux [ alsa-lib libjack2 ] + ++ lib.optionals stdenv.isDarwin [ CoreAudio ] + ; + cmakeEnableFlag = "GR_AUDIO"; + }; + gr-channels = { + cmakeEnableFlag = "GR_CHANNELS"; + }; + gr-qtgui = { + runtime = [ qt5.qtbase libsForQt5.qwt ]; + pythonRuntime = [ python.pkgs.pyqt5 ]; + cmakeEnableFlag = "GR_QTGUI"; + }; + gr-trellis = { + cmakeEnableFlag = "GR_TRELLIS"; + }; + gr-uhd = { + runtime = [ + uhd + ]; + 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 + ]; + cmakeEnableFlag = "GR_MODTOOL"; + }; + gr-blocktool = { + cmakeEnableFlag = "GR_BLOCKTOOL"; + }; + gr-video-sdl = { + runtime = [ SDL ]; + cmakeEnableFlag = "GR_VIDEO_SDL"; + }; + gr-vocoder = { + runtime = [ codec2 gsm ]; + cmakeEnableFlag = "GR_VOCODER"; + }; + gr-wavelet = { + cmakeEnableFlag = "GR_WAVELET"; + runtime = [ gsl libsodium ]; + }; + gr-zeromq = { + runtime = [ cppzmq zeromq ]; + cmakeEnableFlag = "GR_ZEROMQ"; + }; + gr-network = { + cmakeEnableFlag = "GR_NETWORK"; + }; + gr-soapy = { + cmakeEnableFlag = "GR_SOAPY"; + runtime = [ + soapysdr + ]; + }; + }; + shared = (import ./shared.nix { + inherit + stdenv + lib + python + removeReferencesTo + featuresInfo + features + versionAttr + sourceSha256 + overrideSrc + fetchFromGitHub + ; + qt = qt5; + gtk = gtk3; + }); + inherit (shared) hasFeature; # function +in + +stdenv.mkDerivation rec { + inherit pname; + inherit (shared) + version + src + nativeBuildInputs + buildInputs + cmakeFlags + disallowedReferences + stripDebugList + doCheck + dontWrapPythonPrograms + dontWrapQtApps + meta + ; + patches = [ + # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227 + ./modtool-newmod-permissions.patch + ]; + 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") { + inherit uhd; + } // 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") '' + ${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/default.nix b/pkgs/applications/radio/gnuradio/default.nix index 784ab7bd0fc23..3e1366547ee7b 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -9,7 +9,7 @@ , cppunit , orc , boost -, log4cpp +, spdlog , mpir , doxygen , python @@ -18,6 +18,8 @@ , fftwFloat , alsa-lib , libjack2 +, libiio +, libad9361 , CoreAudio , uhd , SDL @@ -45,14 +47,14 @@ , overrideSrc ? {} , pname ? "gnuradio" , versionAttr ? { - major = "3.9"; - minor = "5"; + major = "3.10"; + minor = "0"; patch = "0"; } }: let - sourceSha256 = "sha256-TWCXLoS+ImKNd2zkxMks4FXsQMvGKgcW5/MW8S1Y1TY="; + sourceSha256 = "sha256-1K8nlNiirks3MJ+9cH9bkILVFtu5OxhKkNhetGqojn4="; featuresInfo = { # Needed always basic = { @@ -64,7 +66,7 @@ let runtime = [ volk boost - log4cpp + spdlog mpir ] # when gr-qtgui is disabled, icu needs to be included, otherwise @@ -171,6 +173,22 @@ let gr-channels = { cmakeEnableFlag = "GR_CHANNELS"; }; + gr-pdu = { + cmakeEnableFlag = "GR_PDU"; + runtime = [ + libiio + libad9361 + ]; + }; + gr-iio = { + cmakeEnableFlag = "GR_IIO"; + runtime = [ + libiio + ]; + }; + common-precompiled-headers = { + cmakeEnableFlag = "COMMON_PCH"; + }; gr-qtgui = { runtime = [ qt5.qtbase libsForQt5.qwt ]; pythonRuntime = [ python.pkgs.pyqt5 ]; diff --git a/pkgs/development/gnuradio-modules/grnet/default.nix b/pkgs/development/gnuradio-modules/grnet/default.nix index 568e63a77b8b2..6e8b72a6565b3 100644 --- a/pkgs/development/gnuradio-modules/grnet/default.nix +++ b/pkgs/development/gnuradio-modules/grnet/default.nix @@ -52,6 +52,7 @@ mkDerivation { pname = "gr-grnet"; version = version.name; inherit src; + disabledForGRafter = "3.10"; buildInputs = [ boost diff --git a/pkgs/development/gnuradio-modules/limesdr/default.nix b/pkgs/development/gnuradio-modules/limesdr/default.nix index f26e4695a10c0..48bbc68c80a3b 100644 --- a/pkgs/development/gnuradio-modules/limesdr/default.nix +++ b/pkgs/development/gnuradio-modules/limesdr/default.nix @@ -20,7 +20,6 @@ let version = { "3.7" = "2.0.0"; "3.8" = "3.0.1"; - "3.9" = null; }.${gnuradio.versionAttr.major}; src = fetchFromGitHub { owner = "myriadrf"; @@ -29,7 +28,6 @@ let sha256 = { "3.7" = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq"; "3.8" = "ffs+8TU0yr6IW1xZJ/abQ1CQWGZM+zYqPRJxy3ZvM9U="; - "3.9" = null; }.${gnuradio.versionAttr.major}; }; in mkDerivation { diff --git a/pkgs/development/gnuradio-modules/osmosdr/default.nix b/pkgs/development/gnuradio-modules/osmosdr/default.nix index ebb34afee1019..326a2b9d9bdea 100644 --- a/pkgs/development/gnuradio-modules/osmosdr/default.nix +++ b/pkgs/development/gnuradio-modules/osmosdr/default.nix @@ -24,16 +24,14 @@ let version = { "3.7" = "0.1.5"; - "3.8" = "0.2.2"; - "3.9" = null; + "3.8" = "0.2.3"; }.${gnuradio.versionAttr.major}; src = fetchgit { url = "git://git.osmocom.org/gr-osmosdr"; rev = "v${version}"; sha256 = { "3.7" = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv"; - "3.8" = "HT6xlN6cJAnvF+s1g2I1uENhBJJizdADlLXeSD0rEqs="; - "3.9" = null; + "3.8" = "sha256-ZfI8MshhZOdJ1U5FlnZKXsg2Rsvb6oKg943ZVYd/IWo="; }.${gnuradio.versionAttr.major}; }; in mkDerivation { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fcdea08f9fe0d..516412bdc711d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25349,6 +25349,38 @@ with pkgs; }; }; }; + gnuradio3_9 = callPackage ../applications/radio/gnuradio/wrapper.nix { + unwrapped = callPackage ../applications/radio/gnuradio/3.9.nix { + inherit (darwin.apple_sdk.frameworks) CoreAudio; + python = python3; + }; + }; + gnuradio3_9Packages = lib.recurseIntoAttrs gnuradio.pkgs; + # A build without gui components and other utilites not needed for end user + # libraries + gnuradio3_9Minimal = gnuradio.override { + doWrap = false; + unwrapped = gnuradio.unwrapped.override { + volk = volk.override { + # So it will not reference python + enableModTool = false; + }; + features = { + gnuradio-companion = false; + python-support = false; + examples = false; + gr-qtgui = false; + gr-utils = false; + gr-modtool = false; + 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; + }; + }; + }; gnuradio3_8 = callPackage ../applications/radio/gnuradio/wrapper.nix { unwrapped = callPackage ../applications/radio/gnuradio/3.8.nix { inherit (darwin.apple_sdk.frameworks) CoreAudio; |