3
0
Fork 0
forked from mirrors/nixpkgs

buildRustCrate: Set target_os to "macos" on darwin

The rust compiler uses "macos" as "target_os" conditional on Mac OS[1]

[1] 8e7a609e63/src/librustc_back/target/x86_64_apple_darwin.rs (L29)
This commit is contained in:
Mario Rodas 2017-12-28 09:36:40 -05:00
parent eb05f92c08
commit bdf031dd4f

View file

@ -98,7 +98,7 @@ let makeDeps = dependencies:
export CARGO_PKG_AUTHORS="${authors}"
export CARGO_CFG_TARGET_ARCH=${buildPlatform.parsed.cpu.name}
export CARGO_CFG_TARGET_OS=${buildPlatform.parsed.kernel.name}
export CARGO_CFG_TARGET_OS=${if buildPlatform.isDarwin then "macos" else buildPlatform.parsed.kernel.name}
export CARGO_CFG_TARGET_FAMILY="unix"
export CARGO_CFG_UNIX=1
export CARGO_CFG_TARGET_ENV="gnu"