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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user