diff --git a/lib/systems/default.nix b/lib/systems/default.nix index f2be7c2c5094..a5db767730a9 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -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. diff --git a/lib/tests/systems.nix b/lib/tests/systems.nix index 2cc8f7aa607e..3feef87d97c0 100644 --- a/lib/tests/systems.nix +++ b/lib/tests/systems.nix @@ -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