pkgs/config.nix: Fix infinite recursion when freeform config is strict in pkgs

https://github.com/NixOS/nixpkgs/issues/175196

The loop involved:

 - pkgs is strict in the config.nix freeformType's produced attrNames,
   as these are included in the config.
 - the attrNames were strict in all the direct attrValues, because of
   scanning for `mkIf`s.

`lazyAttrsOf` removes proper `mkIf` support, which we don't need here.
This commit is contained in:
Robert Hensing 2022-05-29 10:24:20 +02:00
parent 523eb4a181
commit 1a7c0eac15

View File

@ -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;