From 4e1ee79946054e8490427a9436afab0502788f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 23 May 2024 14:55:04 -0700 Subject: [PATCH] libphonenumber: 8.12.37 -> 8.13.37 Diff: https://github.com/google/libphonenumber/compare/v8.12.37...v8.13.37 Changelog: https://github.com/google/libphonenumber/blob/v8.13.37/release_notes.txt --- .../libraries/libphonenumber/default.nix | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/pkgs/development/libraries/libphonenumber/default.nix b/pkgs/development/libraries/libphonenumber/default.nix index edd337961727..f8ce0d5ecbbd 100644 --- a/pkgs/development/libraries/libphonenumber/default.nix +++ b/pkgs/development/libraries/libphonenumber/default.nix @@ -1,14 +1,25 @@ -{ lib, stdenv, fetchFromGitHub, cmake, gtest, boost, pkg-config, protobuf, icu, Foundation, buildPackages }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, gtest +, jre +, pkg-config +, boost +, icu +, protobuf +, Foundation +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libphonenumber"; - version = "8.12.37"; + version = "8.13.37"; src = fetchFromGitHub { - owner = "googlei18n"; + owner = "google"; repo = "libphonenumber"; - rev = "v${version}"; - sha256 = "sha256-xLxadSxVY3DjFDQrqj3BuOvdMaKdFSLjocfzovJCBB0="; + rev = "v${finalAttrs.version}"; + hash = "sha256-TQ9Hz9fnKZhZkg+hkXgFqH4TDCWMe+fcEWE6ShwSBBU="; }; patches = [ @@ -19,29 +30,30 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake + gtest + jre pkg-config ]; buildInputs = [ boost - protobuf icu - gtest - ] ++ lib.optional stdenv.isDarwin Foundation; + protobuf + ] ++ lib.optionals stdenv.isDarwin [ + Foundation + ]; cmakeDir = "../cpp"; - cmakeFlags = - lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ - "-DBUILD_GEOCODER=OFF" - "-DPROTOC_BIN=${buildPackages.protobuf}/bin/protoc" - ]; - checkPhase = "./libphonenumber_test"; + doCheck = true; + + checkTarget = "tests"; meta = with lib; { + changelog = "https://github.com/google/libphonenumber/blob/${finalAttrs.src.rev}/release_notes.txt"; description = "Google's i18n library for parsing and using phone numbers"; homepage = "https://github.com/google/libphonenumber"; license = licenses.asl20; maintainers = with maintainers; [ illegalprime ]; }; -} +})