Skip to content

Commit

Permalink
Merge pull request NixOS#175274 from hercules-ci/issue-175196
Browse files Browse the repository at this point in the history
pkgs/tests/config.nix: Make test future proof
  • Loading branch information
roberth authored May 31, 2022
2 parents c532e8c + 28f9043 commit 07a875c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions pkgs/test/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ lib.recurseIntoAttrs {
tempAllow pkgs.authy "2.1.0" [ "electron-9.4.4" ];
};
};
# Allow with forgetting
tempAllow = p: v: pa:
lib.optionals (lib.assertMsg (p.version == v) "${p.name} is no longer at version ${v}, consider removing the tempAllow") pa;
# For this test we don't _really_ care about the version though,
# only about evaluation strictness
tempAllowAlike = p: v: pa: builtins.seq v builtins.seq p.version pa;
# A simplification of `tempAllow` that doesn't check the version, but
# has the same strictness characteristics. Actually checking a version
# here would add undue maintenance.
#
# Original:
# 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;

Expand Down

0 comments on commit 07a875c

Please sign in to comment.