diff options
author | Robert Hensing <robert@roberthensing.nl> | 2024-04-24 12:44:31 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2024-04-24 12:46:23 +0200 |
commit | 837966790cf9d9edb2e9115fcdfe3963795aa88c (patch) | |
tree | 9c3745713c18f3a44d025cccfcd0679a3a4e1ddd /pkgs/test | |
parent | c115010a8b95e60d2e155e6dde9d0b3b31595e08 (diff) |
tests.config: Simplify example
authy was about to be removed, so this test had to be updated.
Diffstat (limited to 'pkgs/test')
-rw-r--r-- | pkgs/test/config.nix | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/pkgs/test/config.nix b/pkgs/test/config.nix index 734e1aace148..24a840af0aea 100644 --- a/pkgs/test/config.nix +++ b/pkgs/test/config.nix @@ -2,22 +2,19 @@ lib.recurseIntoAttrs { # https://github.com/NixOS/nixpkgs/issues/175196 + # This test has since been simplified to test the recursion without + # the fluff to make it look like a real-world example. + # The requirement we test here is: + # - `permittedInsecurePackages` must be allowed to + # use `pkgs` to retrieve at least *some* information. + # + # Instead of `builtins.seq`, the list may be constructed based on actual package info. allowPkgsInPermittedInsecurePackages = let pkgs = import ../.. { config = { - permittedInsecurePackages = - tempAllow pkgs.authy "2.1.0" [ "electron-9.4.4" ]; + permittedInsecurePackages = builtins.seq pkgs.glibc.version []; }; }; - # 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; |