From fd05cc6897979abee33c0d52c025bab38f2ca9bf Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Wed, 1 Apr 2026 14:33:24 -0700 Subject: [PATCH] srsran: fix build with boost 1.89 Boost 1.89 removed the boost_system stub library. Remove boost_system references from FindUHD.cmake, the hardcoded .so path, and the BOOST_REQUIRED_COMPONENTS list. --- pkgs/by-name/sr/srsran/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/sr/srsran/package.nix b/pkgs/by-name/sr/srsran/package.nix index 96e805a122a2..a49abe56173f 100644 --- a/pkgs/by-name/sr/srsran/package.nix +++ b/pkgs/by-name/sr/srsran/package.nix @@ -55,6 +55,17 @@ stdenv.mkDerivation (finalAttrs: { zeromq ]; + # boost 1.89 removed the boost_system stub library + postPatch = '' + substituteInPlace cmake/modules/FindUHD.cmake --replace-fail \ + 'set(CMAKE_REQUIRED_LIBRARIES uhd boost_program_options boost_system)' \ + 'set(CMAKE_REQUIRED_LIBRARIES uhd boost_program_options)' + substituteInPlace lib/src/phy/rf/CMakeLists.txt --replace-fail \ + '/usr/lib/x86_64-linux-gnu/libboost_system.so' "" + substituteInPlace CMakeLists.txt --replace-fail \ + 'list(APPEND BOOST_REQUIRED_COMPONENTS "system")' "" + ''; + cmakeFlags = [ "-DENABLE_WERROR=OFF" (lib.cmakeBool "ENABLE_LTE_RATES" enableLteRates)