pkgs/tests/config.nix: Make test future proof

This commit is contained in:
Robert Hensing 2022-05-29 11:50:48 +02:00
parent 1a7c0eac15
commit 28f9043aa9

View file

@ -9,12 +9,15 @@ lib.recurseIntoAttrs {
tempAllow pkgs.authy "2.1.0" [ "electron-9.4.4" ]; tempAllow pkgs.authy "2.1.0" [ "electron-9.4.4" ];
}; };
}; };
# Allow with forgetting # A simplification of `tempAllow` that doesn't check the version, but
tempAllow = p: v: pa: # has the same strictness characteristics. Actually checking a version
lib.optionals (lib.assertMsg (p.version == v) "${p.name} is no longer at version ${v}, consider removing the tempAllow") pa; # here would add undue maintenance.
# For this test we don't _really_ care about the version though, #
# only about evaluation strictness # Original:
tempAllowAlike = p: v: pa: builtins.seq v builtins.seq p.version pa; # tempAllow = p: v: pa:
# lib.optionals (lib.assertMsg (p.version == v) "${p.name} is no longer at version ${v}, consider removing the tempAllow") pa;
#
tempAllow = p: v: pa: builtins.seq v builtins.seq p.version pa;
in pkgs.hello; in pkgs.hello;