summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lib/systems/default.nix4
-rw-r--r--lib/tests/systems.nix2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index abaad19a3e1..3558ce32fc8 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 082b3549086..617fb0d18b1 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 = "<<modified>>";
+        arbitraryValue = x: "<<modified>>";
     in {
       expr = lib.systems.equals (lib.systems.elaborate "x86_64-linux") modified;
       expected = {