diff options
author | Matthieu Coudron <886074+teto@users.noreply.github.com> | 2023-12-14 22:41:50 +0100 |
---|---|---|
committer | Matthieu Coudron <886074+teto@users.noreply.github.com> | 2023-12-15 15:05:46 +0100 |
commit | 4ea6c0c58bea95f22fbca81ae5edddc93b342b5e (patch) | |
tree | 69d629f275df0ff1b91505b38b501286a9beeae1 /lib/generators.nix | |
parent | d4af6e420f92351da65e6726fe7246adc9e1d498 (diff) |
lib.generators: made toLua accept derivations too
While trying to extend generateLuarocksConfig, I had infinite loops caused by toLua considering derivations as attrSets
Diffstat (limited to 'lib/generators.nix')
-rw-r--r-- | lib/generators.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/generators.nix b/lib/generators.nix index 8e93ed04916e2..ed59654cc07e3 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -525,6 +525,8 @@ ${expr "" v} "(${v.expr})" else if v == { } then "{}" + else if libAttr.isDerivation v then + ''"${toString v}"'' else "{${introSpace}${concatItems ( lib.attrsets.mapAttrsToList (key: value: "[${builtins.toJSON key}] = ${toLua innerArgs value}") v |