mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
lib.systems: Fix setting rust.platform.os for wasm32-unknown-unknown
Previously we would fallback to using `kernel` as the `os` which would result in using the wrong `os` value (`none`) when actually we want `unknown`. This seems to be a special case for wasm32-unknown-unknown and wasm64-unknown-unknown so I extended the if statement to support it.
This commit is contained in:
parent
1eb5e94d66
commit
bf61b8c8fb
@ -323,6 +323,7 @@ let
|
||||
os =
|
||||
/**/ if rust ? platform then rust.platform.os or "none"
|
||||
else if final.isDarwin then "macos"
|
||||
else if final.isWasm && !final.isWasi then "unknown" # Needed for {wasm32,wasm64}-unknown-unknown.
|
||||
else final.parsed.kernel.name;
|
||||
|
||||
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_family
|
||||
|
Loading…
Reference in New Issue
Block a user