diff options
author | Ewout Van Troostenberghe <evantroostenberghe@hubspot.com> | 2022-09-23 21:24:14 +0200 |
---|---|---|
committer | Rick van Schijndel <Mindavi@users.noreply.github.com> | 2022-10-31 21:52:18 +0000 |
commit | d8be1b011fa763ab0261366b59be108e04b50f79 (patch) | |
tree | c11f1a45a000855d54bc47f21d771960d25e1a1b /pkgs/development/libraries/libphonenumber | |
parent | d8218497d3125b20ac62b72b03a74c99a689c292 (diff) |
libphonenumber: fix cross-compilation
The following previously failed and now succeeds. nix-build -A pkgsCross.aarch64-multiplatform.libphonenumber . When compiling natively, the result is the same as before.
Diffstat (limited to 'pkgs/development/libraries/libphonenumber')
-rw-r--r-- | pkgs/development/libraries/libphonenumber/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/development/libraries/libphonenumber/default.nix b/pkgs/development/libraries/libphonenumber/default.nix index b19eee6ccf88b..1c6d355da4299 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"; |