Unverified Commit 863931dc authored by Emily's avatar Emily Committed by GitHub
Browse files

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

parents b08195b3 77d16a17
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
{ 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" ];