about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2024-04-24 13:55:25 +0200
committerGitHub <noreply@github.com>2024-04-24 13:55:25 +0200
commit9140927fb00dbe93262aab85584842297b3684d5 (patch)
tree09c6d6eee67ee3f9cd2105e67882dd174c2e396f
parentb03b5c193b38834ac20d1bd0b0314e33783bd817 (diff)
parent8f805a0660d0dca6c9b5bfc12bc2a85a14c0fa6f (diff)
Merge pull request #306498 from hercules-ci/update-tests-config
Update `tests.config`
-rw-r--r--pkgs/test/config.nix19
-rw-r--r--pkgs/top-level/config.nix6
2 files changed, 14 insertions, 11 deletions
diff --git a/pkgs/test/config.nix b/pkgs/test/config.nix
index 734e1aace1487..24a840af0aead 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;
 
diff --git a/pkgs/top-level/config.nix b/pkgs/top-level/config.nix
index 5c538abcf5cef..67a9a60dbaeaa 100644
--- a/pkgs/top-level/config.nix
+++ b/pkgs/top-level/config.nix
@@ -1,5 +1,11 @@
 # This file defines the structure of the `config` nixpkgs option.
 
+# This file is tested in `pkgs/test/config.nix`.
+# Run tests with:
+#
+#     nix-build -A tests.config
+#
+
 { config, lib, ... }:
 
 let