mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
lib.systems.equals: fix euqality on re-elaborated platform
This commit is contained in:
@@ -85,11 +85,12 @@ let
|
||||
let
|
||||
allArgs = systemToAttrs systemOrArgs;
|
||||
|
||||
# Those two will always be derived from "config", if given, so they should NOT
|
||||
# be overridden further down with "// args".
|
||||
# These attributes are derived from other inputs, so they should NOT be
|
||||
# overridden further down with "// args".
|
||||
args = removeAttrs allArgs [
|
||||
"parsed"
|
||||
"system"
|
||||
"_withoutFunctions"
|
||||
];
|
||||
|
||||
# TODO: deprecate args.rustc in favour of args.rust after 23.05 is EOL.
|
||||
|
||||
@@ -266,6 +266,22 @@ lib.runTests (
|
||||
}).parsed.cpu.arch;
|
||||
expected = "i686";
|
||||
};
|
||||
test_equals_reelaborate_overridden_platform = {
|
||||
expr =
|
||||
let
|
||||
base = lib.systems.elaborate "x86_64-linux";
|
||||
in
|
||||
lib.systems.equals base (
|
||||
lib.systems.elaborate (
|
||||
base
|
||||
// {
|
||||
useLLVM = true;
|
||||
linker = "lld";
|
||||
}
|
||||
)
|
||||
);
|
||||
expected = false;
|
||||
};
|
||||
}
|
||||
// {
|
||||
# equals.functionNames must list exactly the function-valued attrs of an
|
||||
|
||||
Reference in New Issue
Block a user