mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-12 08:00:05 +01:00
fix(#101): description for type handles string correctly
This commit is contained in:
parent
df3a607ad7
commit
5cf27f814c
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ rec {
|
||||||
# uses the field "type" to find the correct type in the attrset
|
# uses the field "type" to find the correct type in the attrset
|
||||||
subType = typeAttr: mkOptionType rec {
|
subType = typeAttr: mkOptionType rec {
|
||||||
name = "subType";
|
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}";
|
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:
|
merge = loc: defs:
|
||||||
foldl' (res: def: typeAttr.${def.value.type}.merge loc [def]) {} defs;
|
foldl' (res: def: typeAttr.${def.value.type}.merge loc [def]) {} defs;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue