1 { lib, stdenv, fetchFromGitHub, cmake, gtest, boost, pkg-config, protobuf, icu, Foundation, buildPackages }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
9 repo = "libphonenumber";
11 sha256 = "sha256-xLxadSxVY3DjFDQrqj3BuOvdMaKdFSLjocfzovJCBB0=";
15 # Submitted upstream: https://github.com/google/libphonenumber/pull/2921
16 ./build-reproducibility.patch
29 ] ++ lib.optional stdenv.isDarwin Foundation;
33 lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
34 "-DBUILD_GEOCODER=OFF"
35 "-DPROTOC_BIN=${buildPackages.protobuf}/bin/protoc"
38 checkPhase = "./libphonenumber_test";
41 description = "Google's i18n library for parsing and using phone numbers";
42 homepage = "https://github.com/google/libphonenumber";
43 license = licenses.asl20;
44 maintainers = with maintainers; [ illegalprime ];