buildRustCrate: Set target_os to "macos" on darwin

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

[1] https://github.com/rust-lang/rust/blob/8e7a609e635b728eba65d471c985ab462dc4cfc7/src/librustc_back/target/x86_64_apple_darwin.rs#L29
This commit is contained in:
Mario Rodas
2018-02-23 18:00:39 -05:00
parent eb05f92c08
commit bdf031dd4f
+1 -1
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"