Loading pkgs/test/config.nix +8 −11 Original line number Diff line number Diff line Loading @@ -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; Loading pkgs/top-level/config.nix +6 −0 Original line number Diff line number Diff line # 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 Loading Loading
pkgs/test/config.nix +8 −11 Original line number Diff line number Diff line Loading @@ -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; Loading
pkgs/top-level/config.nix +6 −0 Original line number Diff line number Diff line # 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 Loading