summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-01-04 00:55:22 +0100
committertv <tv@krebsco.de>2022-01-04 00:55:22 +0100
commit8df499a09a8772a2a03bdef908b9c4b337e96e08 (patch)
tree3c3bc2ac43839136239ce5d0bb2a89e610a5241d /lib
parent818450110795be28c97db849c9a49a13079f4f38 (diff)
lib.toC: admit int
Diffstat (limited to 'lib')
-rw-r--r--lib/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 574713e..94a8143 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -52,6 +52,7 @@ let
type = typeOf x;
reject = throw "cannot convert ${type}";
in {
+ int = toJSON x; # close enough
list = "{ ${concatStringsSep ", " (map toC x)} }";
null = "NULL";
set = if isDerivation x then toJSON x else reject;