From 6bd71d7e085ec519009adc1110082210061a5fa3 Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Sun, 7 Jun 2026 08:36:28 -0400 Subject: [PATCH] pkgs.formats.hcl1: host let variables to outside function scope --- pkgs/pkgs-lib/formats.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/pkgs-lib/formats.nix b/pkgs/pkgs-lib/formats.nix index 06d235fa1884..a7f92f51dab4 100644 --- a/pkgs/pkgs-lib/formats.nix +++ b/pkgs/pkgs-lib/formats.nix @@ -1063,7 +1063,6 @@ optionalAttrs allowAliases aliases }; hcl1 = - args: let # Helper function to recursively transform values for HCL1 canonicalization # Rule: If an attribute value is an attribute set, wrap it in a list @@ -1079,6 +1078,7 @@ optionalAttrs allowAliases aliases value; jsonFormat = json { }; in + args: jsonFormat // { generate = name: value: jsonFormat.generate name (mapAttrs (_: transform) value);