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.
This commit is contained in:
parent
d8218497d3
commit
d8be1b011f
1 changed files with 7 additions and 2 deletions
|
@ -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";
|
||||
|
||||
|
|
Loading…
Reference in a new issue