cargo-i18n: fix build with newer versions of Clang (#355565)

This commit is contained in:
Emily 2024-11-13 01:59:26 +00:00 committed by GitHub
commit 863931dca1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,8 +1,7 @@
{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, darwin
, gettext
}:
rustPlatform.buildRustPackage rec {
@ -18,9 +17,13 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-vN62QmCuhu7AjL6xSpBU6/ul4WgNLZbjWDCFyHj6rIM=";
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Foundation
];
# Devendor gettext in the gettext-sys crate. The paths to the bin/lib/include folders have to be specified because
# setting `GETTEXT_SYSTEM` only works on some platforms (i.e., not Darwin).
env = {
GETTEXT_BIN_DIR = "${lib.getBin gettext}/bin";
GETTEXT_LIB_DIR = "${lib.getLib gettext}/lib";
GETTEXT_INCLUDE_DIR = "${lib.getInclude gettext}/include";
};
cargoTestFlags = [ "--lib" ];