From 5cf27f814c12f2c2c449a026009ba8d18c703e00 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sat, 31 Dec 2022 12:30:39 -0800 Subject: [PATCH] fix(#101): description for type handles string correctly --- types.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types.nix b/types.nix index c0d18d0..2e077b2 100644 --- a/types.nix +++ b/types.nix @@ -9,7 +9,7 @@ rec { # uses the field "type" to find the correct type in the attrset subType = typeAttr: mkOptionType rec { name = "subType"; - description = "one of ${attrNames typeAttr}"; + description = "one of ${concatStringsSep "," (attrNames typeAttr)}"; check = x: if x ? type then typeAttr.${x.type}.check x else throw "No type option set in:\n${generators.toPretty {} x}"; merge = loc: defs: foldl' (res: def: typeAttr.${def.value.type}.merge loc [def]) {} defs;