From c40ccbcd4624e3d901e8067b9a69194b3c8fed4b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 4 Aug 2025 07:33:58 +0000 Subject: [PATCH 1/2] libphonenumber: 9.0.10 -> 9.0.12 --- pkgs/by-name/li/libphonenumber/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/li/libphonenumber/package.nix b/pkgs/by-name/li/libphonenumber/package.nix index 6db8f301445c..4a71dd1bcd3c 100644 --- a/pkgs/by-name/li/libphonenumber/package.nix +++ b/pkgs/by-name/li/libphonenumber/package.nix @@ -14,13 +14,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "libphonenumber"; - version = "9.0.10"; + version = "9.0.12"; src = fetchFromGitHub { owner = "google"; repo = "libphonenumber"; tag = "v${finalAttrs.version}"; - hash = "sha256-b/TQhHG7qPzXcFtiFNXOu1hkFfT9KnZNPa+AB/Fmk0E="; + hash = "sha256-ylEv1YtnzXGHLKVY1INEq2GXrxgfy6R0cL199ec8CyQ="; }; patches = [ From 5956f328e2eaab43dfc40e4c63259a83eb344198 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 14 Aug 2025 14:29:28 +0800 Subject: [PATCH 2/2] libphonenumber: allow building without openjdk --- pkgs/by-name/li/libphonenumber/package.nix | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/li/libphonenumber/package.nix b/pkgs/by-name/li/libphonenumber/package.nix index 4a71dd1bcd3c..3b4231e1d6f2 100644 --- a/pkgs/by-name/li/libphonenumber/package.nix +++ b/pkgs/by-name/li/libphonenumber/package.nix @@ -4,6 +4,7 @@ fetchFromGitHub, buildPackages, cmake, + enableTests ? true, gtest, jre, pkg-config, @@ -31,27 +32,36 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake + pkg-config + ] + ++ lib.optionals enableTests [ gtest jre - pkg-config ]; buildInputs = [ - boost icu protobuf + ] + ++ lib.optionals enableTests [ + boost ]; cmakeDir = "../cpp"; - doCheck = true; + doCheck = enableTests; checkTarget = "tests"; - cmakeFlags = lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ - (lib.cmakeFeature "CMAKE_CROSSCOMPILING_EMULATOR" (stdenv.hostPlatform.emulator buildPackages)) - (lib.cmakeFeature "PROTOC_BIN" (lib.getExe buildPackages.protobuf)) - ]; + cmakeFlags = + lib.optionals (!enableTests) [ + (lib.cmakeBool "REGENERATE_METADATA" false) + (lib.cmakeBool "USE_BOOST" false) + ] + ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + (lib.cmakeFeature "CMAKE_CROSSCOMPILING_EMULATOR" (stdenv.hostPlatform.emulator buildPackages)) + (lib.cmakeFeature "PROTOC_BIN" (lib.getExe buildPackages.protobuf)) + ]; meta = with lib; { changelog = "https://github.com/google/libphonenumber/blob/${finalAttrs.src.rev}/release_notes.txt";