From 1a7c0eac1572f56afa970e5fe6493b85cecf51a5 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 29 May 2022 10:24:20 +0200 Subject: [PATCH] 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. --- pkgs/top-level/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/config.nix b/pkgs/top-level/config.nix index ad06227e74f1..e038973e0858 100644 --- a/pkgs/top-level/config.nix +++ b/pkgs/top-level/config.nix @@ -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;