From 479c683ee6c41cfd74775139af66114bfae6ebfc Mon Sep 17 00:00:00 2001 From: Tom Hunze Date: Thu, 19 Feb 2026 20:12:42 +0100 Subject: [PATCH] libphonenumber: unpin boost, fix build with boost 1.89 Finding `boost_system` fails because the stub compiled library of Boost.System, which has been a header-only library since 1.69, was removed in 1.89 [1]. Upstream PR: https://github.com/google/libphonenumber/pull/3903 [1] https://www.boost.org/releases/1.89.0/ --- .../li/libphonenumber/boost-1.89.patch | 22 +++++++++++++++++++ pkgs/by-name/li/libphonenumber/package.nix | 10 ++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 pkgs/by-name/li/libphonenumber/boost-1.89.patch diff --git a/pkgs/by-name/li/libphonenumber/boost-1.89.patch b/pkgs/by-name/li/libphonenumber/boost-1.89.patch new file mode 100644 index 000000000000..835721381768 --- /dev/null +++ b/pkgs/by-name/li/libphonenumber/boost-1.89.patch @@ -0,0 +1,22 @@ +From 72c1023fbf00fc48866acab05f6ccebcae7f3213 Mon Sep 17 00:00:00 2001 +From: Michael Cho +Date: Mon, 11 Aug 2025 17:08:15 -0400 +Subject: [PATCH] Fix build with Boost 1.89.0 + +--- + cpp/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index 27e4680ccc..39f05d2c9a 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -145,7 +145,7 @@ if (USE_BOOST) + if (WIN32) + set (Boost_USE_STATIC_LIBS ON) + endif () +- find_package (Boost 1.40.0 COMPONENTS date_time system thread) ++ find_package (Boost 1.40.0 COMPONENTS date_time thread OPTIONAL_COMPONENTS system) + if (NOT Boost_FOUND) + print_error ("Boost Date_Time/System/Thread" "Boost") + endif () diff --git a/pkgs/by-name/li/libphonenumber/package.nix b/pkgs/by-name/li/libphonenumber/package.nix index 4b2d500c76d1..8f0d10b8e09c 100644 --- a/pkgs/by-name/li/libphonenumber/package.nix +++ b/pkgs/by-name/li/libphonenumber/package.nix @@ -8,8 +8,7 @@ gtest, jre, pkg-config, - # complains about missing boost.system on 1.89 - boost188, + boost, icu, protobuf, }: @@ -31,6 +30,11 @@ stdenv.mkDerivation (finalAttrs: { ./build-reproducibility.patch # Fix include directory in generated cmake files with split outputs ./cmake-include-dir.patch + # Finding `boost_system` fails because the stub compiled library of + # Boost.System, which has been a header-only library since 1.69, was + # removed in 1.89. + # Upstream PR: https://github.com/google/libphonenumber/pull/3903 + ./boost-1.89.patch ]; outputs = [ @@ -53,7 +57,7 @@ stdenv.mkDerivation (finalAttrs: { ]; propagatedBuildInputs = lib.optionals enableTests [ - boost188 + boost ]; cmakeDir = "../cpp";