diff --git a/pkgs/development/libraries/libphonenumber/default.nix b/pkgs/development/libraries/libphonenumber/default.nix index b19eee6ccf88..1c6d355da429 100644 --- a/pkgs/development/libraries/libphonenumber/default.nix +++ b/pkgs/development/libraries/libphonenumber/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, gtest, boost, pkg-config, protobuf, icu, Foundation }: +{ lib, stdenv, fetchFromGitHub, cmake, gtest, boost, pkg-config, protobuf, icu, Foundation, buildPackages }: stdenv.mkDerivation rec { pname = "phonenumber"; @@ -13,7 +13,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake - gtest pkg-config ]; @@ -21,9 +20,15 @@ stdenv.mkDerivation rec { boost protobuf icu + gtest ] ++ lib.optional stdenv.isDarwin Foundation; cmakeDir = "../cpp"; + cmakeFlags = + lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "-DBUILD_GEOCODER=OFF" + "-DPROTOC_BIN=${buildPackages.protobuf}/bin/protoc" + ]; checkPhase = "./libphonenumber_test";