mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-30 22:21:26 +00:00
Add Type information into manual and manpages, fixes #4600
This commit is contained in:
parent
7af2eee472
commit
79a51b0cf3
@ -96,6 +96,7 @@ rec {
|
||||
declarations = filter (x: x != unknownModule) opt.declarations;
|
||||
internal = opt.internal or false;
|
||||
visible = opt.visible or true;
|
||||
type = opt.type.name or null;
|
||||
}
|
||||
// (if opt ? example then { example = scrubOptionValue opt.example; } else {})
|
||||
// (if opt ? default then { default = scrubOptionValue opt.default; } else {})
|
||||
|
@ -20,7 +20,8 @@ let
|
||||
declarations = map (fn: stripPrefix fn) opt.declarations;
|
||||
}
|
||||
// optionalAttrs (opt ? example) { example = substFunction opt.example; }
|
||||
// optionalAttrs (opt ? default) { default = substFunction opt.default; });
|
||||
// optionalAttrs (opt ? default) { default = substFunction opt.default; }
|
||||
// optionalAttrs (opt ? type) { type = substFunction opt.type; });
|
||||
|
||||
prefix = toString ../../..;
|
||||
|
||||
|
@ -34,6 +34,14 @@
|
||||
select="attr[@name = 'description']/string/@value" />
|
||||
</para>
|
||||
|
||||
<xsl:if test="attr[@name = 'type']">
|
||||
<para>
|
||||
<emphasis>Type:</emphasis>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="attr[@name = 'type']" mode="top" />
|
||||
</para>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="attr[@name = 'default']">
|
||||
<para>
|
||||
<emphasis>Default:</emphasis>
|
||||
|
Loading…
Reference in New Issue
Block a user