Merge pull request #316094 from uninsane/pr-libphonenumber-cross

libphonenumber: fix cross compilation
This commit is contained in:
Artturin
2024-06-02 14:47:25 +03:00
committed by GitHub
@@ -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";