mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
Merge pull request #175265 from hercules-ci/issue-175196
Fix issue #175196, infinite recursion in pkgs/config.nix
This commit is contained in:
commit
e8e9cebbda
21
pkgs/test/config.nix
Normal file
21
pkgs/test/config.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ lib, ... }:
|
||||
lib.recurseIntoAttrs {
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/175196
|
||||
allowPkgsInPermittedInsecurePackages =
|
||||
let pkgs = import ../.. {
|
||||
config = {
|
||||
permittedInsecurePackages =
|
||||
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;
|
||||
|
||||
in pkgs.hello;
|
||||
|
||||
}
|
@ -22,6 +22,8 @@ with pkgs;
|
||||
cc-wrapper-libcxx-9 = callPackage ./cc-wrapper { stdenv = llvmPackages_9.libcxxStdenv; };
|
||||
stdenv-inputs = callPackage ./stdenv-inputs { };
|
||||
|
||||
config = callPackage ./config.nix { };
|
||||
|
||||
haskell = callPackage ./haskell { };
|
||||
|
||||
cc-multilib-gcc = callPackage ./cc-wrapper/multilib.nix { stdenv = gccMultiStdenv; };
|
||||
|
@ -128,7 +128,7 @@ let
|
||||
in {
|
||||
|
||||
freeformType =
|
||||
let t = lib.types.attrsOf lib.types.raw;
|
||||
let t = lib.types.lazyAttrsOf lib.types.raw;
|
||||
in t // {
|
||||
merge = loc: defs:
|
||||
let r = t.merge loc defs;
|
||||
|
Loading…
Reference in New Issue
Block a user