15 stdenv.mkDerivation (finalAttrs: {
16 pname = "libphonenumber";
19 src = fetchFromGitHub {
21 repo = "libphonenumber";
22 rev = "v${finalAttrs.version}";
23 hash = "sha256-EFrw3pW2uLpzEDMsW251rsB5rvC31eLYQBqYOgGt1Ug=";
27 # An earlier version of this patch was submitted upstream but did not get
28 # any interest there - https://github.com/google/libphonenumber/pull/2921
29 ./build-reproducibility.patch
43 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
51 checkTarget = "tests";
53 cmakeFlags = lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
54 (lib.cmakeFeature "CMAKE_CROSSCOMPILING_EMULATOR" (stdenv.hostPlatform.emulator buildPackages))
55 (lib.cmakeFeature "PROTOC_BIN" (lib.getExe buildPackages.protobuf))
59 changelog = "https://github.com/google/libphonenumber/blob/${finalAttrs.src.rev}/release_notes.txt";
60 description = "Google's i18n library for parsing and using phone numbers";
61 homepage = "https://github.com/google/libphonenumber";
62 license = licenses.asl20;
63 maintainers = with maintainers; [ illegalprime ];