nixpkgs/lib/systems
Alyssa Ross 62f7a6dcc1 lib.systems.elaborate: fix passing rust
Usually, attributes passed explicitly to elaborate take precedence
over the elaborated ones, but since we also elaborate the nested
"rust" attrset, we need to push that one level down, so the rest of
"rust" is still filled in if you just pass
{ rust = { config = ... } }.

I've had to drop the assertion that checked that at most one of "rust"
and "rustc" was part of the un-elaborated system, because doing this
broke passing an elaborated system in, which should be idempotent.

For the same reason, I've also had to make it possible for
rust.rustcTargetSpec to be passed in.  Otherwise, on the second call,
since platform was filled in by the first, the custom target file
would be constructed.  The only other way to avoid this would be to
compare the platform attrs to all built in Rust targets to check it
wasn't one of those, and that isn't feasible.

Fixes: e3e57b8f1885 ("lib.systems: elaborate Rust metadata")
2023-11-24 12:21:30 +01:00
..
architectures.nix
default.nix lib.systems.elaborate: fix passing rust 2023-11-24 12:21:30 +01:00
doubles.nix
examples.nix lib.systems, test.cross.sanity: add test case for #264989 2023-11-04 05:57:34 +00:00
flake-systems.nix
inspect.nix lib.systems.inspect: add patternLogicalAnd 2023-11-05 00:55:16 +00:00
parse.nix lib/systems/parse.nix: add, use removeAbiSuffix 2023-10-22 17:05:05 -07:00
platforms.nix