From 7cce734cd3dc70ec1e984ef90186148264473fdc Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 18 Jan 2026 14:15:06 +0200 Subject: [PATCH 01/11] uhd: remove unused expression arguments --- pkgs/by-name/uh/uhd/package.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/by-name/uh/uhd/package.nix b/pkgs/by-name/uh/uhd/package.nix index 91fe583eaa04..e62c01e6ae98 100644 --- a/pkgs/by-name/uh/uhd/package.nix +++ b/pkgs/by-name/uh/uhd/package.nix @@ -1,8 +1,6 @@ { lib, stdenv, - substitute, - fetchpatch, fetchurl, fetchFromGitHub, cmake, From b917d63a445afd70b671242ba4af4ac03df1c3c4 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 18 Jan 2026 14:16:10 +0200 Subject: [PATCH 02/11] uhd: use cmakeBool for more cmakeFlags --- pkgs/by-name/uh/uhd/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/uh/uhd/package.nix b/pkgs/by-name/uh/uhd/package.nix index e62c01e6ae98..39bfff14d328 100644 --- a/pkgs/by-name/uh/uhd/package.nix +++ b/pkgs/by-name/uh/uhd/package.nix @@ -98,11 +98,11 @@ stdenv.mkDerivation (finalAttrs: { }; cmakeFlags = [ - "-DENABLE_LIBUHD=ON" - "-DENABLE_USB=ON" + (cmakeBool "ENABLE_LIBUHD" true) + (cmakeBool "ENABLE_USB" true) # Regardless of doCheck, we want to build the tests to help us gain # confident that the package is OK. - "-DENABLE_TESTS=ON" + (cmakeBool "ENABLE_TESTS" true) (cmakeBool "ENABLE_EXAMPLES" enableExamples) (cmakeBool "ENABLE_UTILS" enableUtils) (cmakeBool "ENABLE_C_API" enableCApi) From e48aceb1507945c3390c4a32f7ccd3bbcf8f20e6 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 20 Jan 2026 13:35:05 +0200 Subject: [PATCH 03/11] uhd: allow to evaluate pythonPath without evaluating package Will help in the next commits when uhd will be marked as broken on Darwin. --- pkgs/by-name/uh/uhd/package.nix | 51 +++++++++++++++++---------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/pkgs/by-name/uh/uhd/package.nix b/pkgs/by-name/uh/uhd/package.nix index 39bfff14d328..d0ec3349b572 100644 --- a/pkgs/by-name/uh/uhd/package.nix +++ b/pkgs/by-name/uh/uhd/package.nix @@ -64,32 +64,33 @@ stdenv.mkDerivation (finalAttrs: { # hash. sha256 = "194gsmvn7gmwj7b1lw9sq0d0y0babbd0q1229qbb3qjc6f6m0p0y"; }; - # This are the minimum required Python dependencies, this attribute might - # be useful if you want to build a development environment with a python - # interpreter able to import the uhd module. - pythonPath = - optionals (enablePythonApi || enableUtils) [ - python3.pkgs.numpy - python3.pkgs.setuptools - ] - ++ optionals enableUtils [ - python3.pkgs.requests - python3.pkgs.six - - /* - These deps are needed for the usrp_hwd.py utility, however even if they - would have been added here, the utility wouldn't have worked because it - depends on an old python library mprpc that is not supported for Python > - 3.8. See also report upstream: - https://github.com/EttusResearch/uhd/issues/744 - - python3.pkgs.gevent - python3.pkgs.pyudev - python3.pkgs.pyroute2 - */ - ]; + inherit (finalAttrs.finalPackage.passthru) pythonPath; passthru = { - runtimePython = python3.withPackages (ps: finalAttrs.pythonPath); + runtimePython = python3.withPackages (ps: finalAttrs.finalPackage.passthru.pythonPath); + # This are the minimum required Python dependencies, this attribute might + # be useful if you want to build a development environment with a python + # interpreter able to import the uhd module. + pythonPath = + optionals (enablePythonApi || enableUtils) [ + python3.pkgs.numpy + python3.pkgs.setuptools + ] + ++ optionals enableUtils [ + python3.pkgs.requests + python3.pkgs.six + + /* + These deps are needed for the usrp_hwd.py utility, however even if they + would have been added here, the utility wouldn't have worked because it + depends on an old python library mprpc that is not supported for Python > + 3.8. See also report upstream: + https://github.com/EttusResearch/uhd/issues/744 + + python3.pkgs.gevent + python3.pkgs.pyudev + python3.pkgs.pyroute2 + */ + ]; updateScript = [ ./update.sh # Pass it this file name as argument From e15dbdf23e428db34ac38efd0d9bb0dbfb43474e Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 20 Jan 2026 11:51:44 +0200 Subject: [PATCH 04/11] uhd: 4.9.0.0 -> 4.9.0.1 --- pkgs/by-name/uh/uhd/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/uh/uhd/package.nix b/pkgs/by-name/uh/uhd/package.nix index d0ec3349b572..09368516d564 100644 --- a/pkgs/by-name/uh/uhd/package.nix +++ b/pkgs/by-name/uh/uhd/package.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { # # nix-shell maintainers/scripts/update.nix --argstr package uhd --argstr commit true # - version = "4.9.0.0"; + version = "4.9.0.1"; outputs = [ "out" @@ -55,14 +55,14 @@ stdenv.mkDerivation (finalAttrs: { rev = "v${finalAttrs.version}"; # The updateScript relies on the `src` using `hash`, and not `sha256. To # update the correct hash for the `src` vs the `uhdImagesSrc` - hash = "sha256-XA/ADJ0HjD6DxqFTVMwFa7tRgM56mHAEL+a0paWxKyM="; + hash = "sha256-AOZYCmkgsM09YORW7dVsPAwecXNZQOxOscJnVOlMoP0="; }; # Firmware images are downloaded (pre-built) from the respective release on Github uhdImagesSrc = fetchurl { url = "https://github.com/EttusResearch/uhd/releases/download/v${finalAttrs.version}/uhd-images_${finalAttrs.version}.tar.xz"; # Please don't convert this to a hash, in base64, see comment near src's # hash. - sha256 = "194gsmvn7gmwj7b1lw9sq0d0y0babbd0q1229qbb3qjc6f6m0p0y"; + sha256 = "15ahcxb7hsylvdzzv0q0shd3wqm7p2y4kzbqk85cvsxbdklxhsvn"; }; inherit (finalAttrs.finalPackage.passthru) pythonPath; passthru = { From 0a4c46a0938e790e062e8bf355f3672306ce9aa2 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 20 Jan 2026 12:27:17 +0200 Subject: [PATCH 05/11] uhd: fix build on Darwin by using llvm 20 Co-Authored-By: fmeef --- pkgs/by-name/uh/uhd/package.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/uh/uhd/package.nix b/pkgs/by-name/uh/uhd/package.nix index 09368516d564..75275f5b3cc9 100644 --- a/pkgs/by-name/uh/uhd/package.nix +++ b/pkgs/by-name/uh/uhd/package.nix @@ -1,6 +1,7 @@ { lib, stdenv, + llvmPackages_20, fetchurl, fetchFromGitHub, cmake, @@ -34,9 +35,17 @@ let inherit (lib) optionals cmakeBool; + stdenv' = ( + # Fix a compilation issue on Darwin, that upstream is aware of: + # https://github.com/EttusResearch/uhd/issues/881 + if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then + llvmPackages_20.stdenv + else + stdenv + ); in -stdenv.mkDerivation (finalAttrs: { +stdenv'.mkDerivation (finalAttrs: { pname = "uhd"; # NOTE: Use the following command to update the package, and the uhdImageSrc attribute: # @@ -147,7 +156,7 @@ stdenv.mkDerivation (finalAttrs: { # ABI differences GCC 7.1 # /nix/store/wd6r25miqbk9ia53pp669gn4wrg9n9cj-gcc-7.3.0/include/c++/7.3.0/bits/vector.tcc:394:7: note: parameter passing for argument of type 'std::vector::iterator {aka __gnu_cxx::__normal_iterator >}' changed in GCC 7.1 ] - ++ optionals stdenv.hostPlatform.isAarch32 [ + ++ optionals stdenv'.hostPlatform.isAarch32 [ "-DCMAKE_CXX_FLAGS=-Wno-psabi" ]; @@ -180,7 +189,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # many tests fails on darwin, according to ofborg - doCheck = !stdenv.hostPlatform.isDarwin; + doCheck = !stdenv'.hostPlatform.isDarwin; doInstallCheck = true; @@ -191,7 +200,7 @@ stdenv.mkDerivation (finalAttrs: { "installFirmware" "removeInstalledTests" ] - ++ optionals (enableUtils && stdenv.hostPlatform.isLinux) [ + ++ optionals (enableUtils && stdenv'.hostPlatform.isLinux) [ "moveUdevRules" ]; From 137d5bf38f202f6ff5581ec31fa8df32b5a382ec Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 20 Jan 2026 21:56:17 +0200 Subject: [PATCH 06/11] thrift: remove duplicate python_test disabled test --- pkgs/by-name/th/thrift/package.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/by-name/th/thrift/package.nix b/pkgs/by-name/th/thrift/package.nix index 6dde051b8890..ee51e31264e6 100644 --- a/pkgs/by-name/th/thrift/package.nix +++ b/pkgs/by-name/th/thrift/package.nix @@ -85,7 +85,6 @@ stdenv.mkDerivation (finalAttrs: { # Tests that hang up in the Darwin sandbox "SecurityTest" "SecurityFromBufferTest" - "python_test" # fails on hydra, passes locally "concurrency_test" From a0b84ca90b3ce1d41a0a619d1d234d67c4d4fcb6 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 20 Jan 2026 21:56:31 +0200 Subject: [PATCH 07/11] thrift: fix build on darwin --- pkgs/by-name/th/thrift/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/th/thrift/package.nix b/pkgs/by-name/th/thrift/package.nix index ee51e31264e6..319c2413d96a 100644 --- a/pkgs/by-name/th/thrift/package.nix +++ b/pkgs/by-name/th/thrift/package.nix @@ -85,6 +85,7 @@ stdenv.mkDerivation (finalAttrs: { # Tests that hang up in the Darwin sandbox "SecurityTest" "SecurityFromBufferTest" + "PythonThriftTNonblockingServer" # fails on hydra, passes locally "concurrency_test" @@ -94,6 +95,7 @@ stdenv.mkDerivation (finalAttrs: { "TInterruptTest" "TServerIntegrationTest" "processor" + "processor_test" "TNonblockingServerTest" "TNonblockingSSLServerTest" "StressTest" From ac2dce6119e32e3209ecd4ff0af6a7d4f4ed6a9c Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 20 Jan 2026 13:17:59 +0200 Subject: [PATCH 08/11] gnuradio: (wrapper) remove old conditionals --- pkgs/applications/radio/gnuradio/wrapper.nix | 117 ++++++++----------- 1 file changed, 51 insertions(+), 66 deletions(-) diff --git a/pkgs/applications/radio/gnuradio/wrapper.nix b/pkgs/applications/radio/gnuradio/wrapper.nix index a741697af3b1..012b42d064c8 100644 --- a/pkgs/applications/radio/gnuradio/wrapper.nix +++ b/pkgs/applications/radio/gnuradio/wrapper.nix @@ -81,35 +81,31 @@ let pname = unwrapped.pname + "-wrapped"; inherit (unwrapped) outputs version; makeWrapperArgs = builtins.concatStringsSep " " ( - [ - ] # Emulating wrapGAppsHook3 & wrapQtAppsHook working together - ++ - lib.optionals ((unwrapped.hasFeature "gnuradio-companion") || (unwrapped.hasFeature "gr-qtgui")) - [ - "--prefix" - "XDG_DATA_DIRS" - ":" - "$out/share" - "--prefix" - "XDG_DATA_DIRS" - ":" - "$out/share/gsettings-schemas/${pname}" - "--prefix" - "XDG_DATA_DIRS" - ":" - "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" - "--prefix" - "XDG_DATA_DIRS" - ":" - "${hicolor-icon-theme}/share" - # Needs to run `gsettings` on startup, see: - # 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.hasFeature "gr-qtgui")) [ + "--prefix" + "XDG_DATA_DIRS" + ":" + "$out/share" + "--prefix" + "XDG_DATA_DIRS" + ":" + "$out/share/gsettings-schemas/${pname}" + "--prefix" + "XDG_DATA_DIRS" + ":" + "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" + "--prefix" + "XDG_DATA_DIRS" + ":" + "${hicolor-icon-theme}/share" + # Needs to run `gsettings` on startup, see: + # 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") [ "--set" "GDK_PIXBUF_MODULE_FILE" @@ -157,45 +153,34 @@ let ":" "${lib.makeSearchPath soapysdr.passthru.searchPath extraSoapySdrPackages}" ] - ++ - lib.optionals (unwrapped.hasFeature "gr-qtgui") - # 3.7 builds with qt4 - ( - if lib.versionAtLeast unwrapped.versionAttr.major "3.8" then - [ - "--prefix" - "QT_PLUGIN_PATH" - ":" - "${lib.makeSearchPath unwrapped.qt.qtbase.qtPluginPrefix ( - map lib.getBin ( - [ - unwrapped.qt.qtbase - ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ - unwrapped.qt.qtwayland - ] - ) - )}" - "--prefix" - "QML2_IMPORT_PATH" - ":" - "${lib.makeSearchPath unwrapped.qt.qtbase.qtQmlPrefix ( - map lib.getBin ( - [ - unwrapped.qt.qtbase - ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ - unwrapped.qt.qtwayland - ] - ) - )}" - ] - else - # Add here qt4 related environment for 3.7? - [ - - ] + ++ lib.optionals (unwrapped.hasFeature "gr-qtgui") [ + "--prefix" + "QT_PLUGIN_PATH" + ":" + "${lib.makeSearchPath unwrapped.qt.qtbase.qtPluginPrefix ( + map lib.getBin ( + [ + unwrapped.qt.qtbase + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + unwrapped.qt.qtwayland + ] ) + )}" + "--prefix" + "QML2_IMPORT_PATH" + ":" + "${lib.makeSearchPath unwrapped.qt.qtbase.qtQmlPrefix ( + map lib.getBin ( + [ + unwrapped.qt.qtbase + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + unwrapped.qt.qtwayland + ] + ) + )}" + ] ++ extraMakeWrapperArgs ); From b090f3d52691a4c2adc97bb8cf00b1d5c08b9d1b Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 20 Jan 2026 13:19:32 +0200 Subject: [PATCH 09/11] gnuradio: (passthru) always inherit not necessarily used deps Shouldn't break anything, and helps referring to gnuradio.passthru.uhd when it might be marked as broken on that the current platform. --- pkgs/applications/radio/gnuradio/default.nix | 35 ++++++++------------ 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/pkgs/applications/radio/gnuradio/default.nix b/pkgs/applications/radio/gnuradio/default.nix index 96962f914f7a..9c4d8cdbf427 100644 --- a/pkgs/applications/radio/gnuradio/default.nix +++ b/pkgs/applications/radio/gnuradio/default.nix @@ -310,27 +310,20 @@ stdenv.mkDerivation ( # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227 ./modtool-newmod-permissions.patch ]; - passthru = - shared.passthru - // { - # Deps that are potentially overridden and are used inside GR plugins - the same version must - inherit - boost - volk - ; - # Used by many gnuradio modules, the same attribute is present in - # previous gnuradio versions where there it's log4cpp. - logLib = spdlog; - } - // lib.optionalAttrs (hasFeature "gr-uhd") { - inherit uhd; - } - // lib.optionalAttrs (hasFeature "gr-pdu") { - inherit libiio libad9361; - } - // lib.optionalAttrs (hasFeature "gr-qtgui") { - inherit (libsForQt5) qwt; - }; + passthru = shared.passthru // { + # Deps that are potentially overridden and are used inside GR plugins - the same version must + inherit + uhd + boost + volk + libiio + libad9361 + ; + # Used by many gnuradio modules, the same attribute is present in + # previous gnuradio versions where there it's log4cpp. + logLib = spdlog; + inherit (libsForQt5) qwt; + }; postInstall = shared.postInstall From 2ea249be1f9df9c5bcf19d4dd6025279c95added Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 20 Jan 2026 13:31:22 +0200 Subject: [PATCH 10/11] gnuradio: (wrapper) add soapyuhd only if gr-uhd is enabled Is justified in anycase, and should help gnuradio evaluate on Darwin when uhd is broken. --- pkgs/applications/radio/gnuradio/wrapper.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/radio/gnuradio/wrapper.nix b/pkgs/applications/radio/gnuradio/wrapper.nix index 012b42d064c8..10896f19f1c1 100644 --- a/pkgs/applications/radio/gnuradio/wrapper.nix +++ b/pkgs/applications/radio/gnuradio/wrapper.nix @@ -50,6 +50,8 @@ soapyplutosdr soapyremote soapyrtlsdr + ] + ++ lib.optionals (unwrapped.hasFeature "gr-uhd") [ soapyuhd ], # Allow to add whatever you want to the wrapper From 3cd940354369c253116bc73424a429a2aec0f58b Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 20 Jan 2026 13:42:16 +0200 Subject: [PATCH 11/11] gnuradio: (wrapper) add uhd Python modules only if needed --- pkgs/applications/radio/gnuradio/wrapper.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/radio/gnuradio/wrapper.nix b/pkgs/applications/radio/gnuradio/wrapper.nix index 10896f19f1c1..d555d23e2fc4 100644 --- a/pkgs/applications/radio/gnuradio/wrapper.nix +++ b/pkgs/applications/radio/gnuradio/wrapper.nix @@ -64,10 +64,14 @@ let pythonPkgs = extraPythonPackages ++ [ (unwrapped.python.pkgs.toPythonModule unwrapped) ] - ++ unwrapped.passthru.uhd.pythonPath - ++ lib.optionals (unwrapped.passthru.uhd.pythonPath != [ ]) [ - (unwrapped.python.pkgs.toPythonModule unwrapped.passthru.uhd) - ] + ++ lib.optionals (unwrapped.hasFeature "gr-uhd") ( + unwrapped.passthru.uhd.pythonPath + # Check if uhd was built with python support, which means it should + # be added as a python module too. + ++ lib.optionals (unwrapped.passthru.uhd.pythonPath != [ ]) [ + (unwrapped.python.pkgs.toPythonModule unwrapped.passthru.uhd) + ] + ) # Add the extraPackages as python modules as well ++ (map unwrapped.python.pkgs.toPythonModule extraPackages) ++ lib.flatten (