mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
lib.generators.toLua: support path-values
This commit is contained in:
@@ -743,6 +743,8 @@ in rec {
|
||||
"nil"
|
||||
else if isInt v || isFloat v || isString v || isBool v then
|
||||
toJSON v
|
||||
else if isPath v || isDerivation v then
|
||||
toJSON "${v}"
|
||||
else if isList v then
|
||||
(if v == [ ] then "{}" else
|
||||
"{${introSpace}${concatItems (map (value: "${toLua innerArgs value}") v)}${outroSpace}}")
|
||||
@@ -752,8 +754,6 @@ in rec {
|
||||
"(${v.expr})"
|
||||
else if v == { } then
|
||||
"{}"
|
||||
else if isDerivation v then
|
||||
''"${toString v}"''
|
||||
else
|
||||
"{${introSpace}${concatItems (
|
||||
mapAttrsToList (key: value: "[${toJSON key}] = ${toLua innerArgs value}") v
|
||||
|
||||
Reference in New Issue
Block a user