Added converter from new option description format to needed for docbook generation.
svn path=/nixpkgs/trunk/; revision=9626
This commit is contained in:
parent
7a9d92486f
commit
0ba29c56f8
@ -230,5 +230,18 @@ rec {
|
||||
else addDefaultOptionValues defValue {};
|
||||
}
|
||||
) (builtins.attrNames defs));
|
||||
|
||||
optionAttrSetToDocList = (l: attrs:
|
||||
(if (getAttr ["_type"] "" attrs) == "option" then
|
||||
[({
|
||||
inherit (attrs) description;
|
||||
}
|
||||
//(if attrs ? example then {inherit(attrs) example;} else {} )
|
||||
//(if attrs ? default then {inherit(attrs) default;} else {} )
|
||||
//{name = l;}
|
||||
)]
|
||||
else (concatLists (map (s: (optionAttrSetToDocList
|
||||
(l + (if l=="" then "" else ".") + s) (builtins.getAttr s attrs)))
|
||||
(builtins.attrNames attrs)))));
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user