libphonenumber: fix cross compilation

This commit is contained in:
Colin 2024-05-31 06:16:08 +00:00
parent 4e60a4d94b
commit 151fb5ea9c

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, buildPackages
, cmake
, gtest
, jre
@ -49,6 +50,11 @@ stdenv.mkDerivation (finalAttrs: {
checkTarget = "tests";
cmakeFlags = lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
(lib.cmakeFeature "CMAKE_CROSSCOMPILING_EMULATOR" (stdenv.hostPlatform.emulator buildPackages))
(lib.cmakeFeature "PROTOC_BIN" (lib.getExe buildPackages.protobuf))
];
meta = with lib; {
changelog = "https://github.com/google/libphonenumber/blob/${finalAttrs.src.rev}/release_notes.txt";
description = "Google's i18n library for parsing and using phone numbers";