diff --git a/lib/systems/default.nix b/lib/systems/default.nix index abaad19a3e1d..3558ce32fc8c 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -24,8 +24,8 @@ rec { both arguments have been `elaborate`-d. */ equals = - let uncomparable = { canExecute = null; emulator = null; emulatorAvailable = null; isCompatible = null; }; - in a: b: a // uncomparable == b // uncomparable; + let removeFunctions = a: lib.filterAttrs (_: v: !builtins.isFunction v) a; + in a: b: removeFunctions a == removeFunctions b; /* Try to convert an elaborated system back to a simple string. If not possible, diff --git a/lib/tests/systems.nix b/lib/tests/systems.nix index 082b3549086f..617fb0d18b12 100644 --- a/lib/tests/systems.nix +++ b/lib/tests/systems.nix @@ -69,7 +69,7 @@ lib.runTests ( let modified = assert origValue != arbitraryValue; lib.systems.elaborate "x86_64-linux" // { ${platformAttrName} = arbitraryValue; }; - arbitraryValue = "<>"; + arbitraryValue = x: "<>"; in { expr = lib.systems.equals (lib.systems.elaborate "x86_64-linux") modified; expected = {