diff options
-rw-r--r-- | lib/generators.nix | 2 | ||||
-rw-r--r-- | lib/tests/misc.nix | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/generators.nix b/lib/generators.nix index abd237eb7d377..800ef5be4fcd0 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -227,7 +227,7 @@ rec { else "{ " + libStr.concatStringsSep " " (libAttr.mapAttrsToList (name: value: - "${toPretty args name} = ${toPretty args value};") v) + "${libStr.escapeNixIdentifier name} = ${toPretty args value};") v) + " }" else if isFunction v then let fna = lib.functionArgs v; diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index b066f577f323b..7d7380e8b74bd 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -469,7 +469,7 @@ runTests { function = "<λ>"; functionArgs = "<λ:{(arg),foo}>"; list = "[ 3 4 ${function} [ false ] ]"; - attrs = "{ \"foo\" = null; \"foo bar\" = \"baz\"; }"; + attrs = "{ foo = null; \"foo bar\" = \"baz\"; }"; drv = "<δ:test>"; }; }; |