* Allow literal examples to be included in the manual.

svn path=/nixos/trunk/; revision=29025
This commit is contained in:
Eelco Dolstra 2011-09-05 10:14:42 +00:00
parent 5813e99fb3
commit 453675c5c1
2 changed files with 14 additions and 6 deletions

View File

@ -52,12 +52,20 @@
</para> </para>
<xsl:if test="attr[@name = 'example']"> <xsl:if test="attr[@name = 'example']">
<para> <para>
<emphasis>Example:</emphasis> <emphasis>Example:</emphasis>
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="attr[@name = 'example']/attrs[attr[@name = '_type' and string[@value = 'literalExample']]]">
<programlisting><xsl:value-of select="attr[@name = 'example']/attrs/attr[@name = 'text']/string/@value" /></programlisting>
</xsl:when>
<xsl:otherwise>
<literal> <literal>
<xsl:apply-templates select="attr[@name = 'example']" /> <xsl:apply-templates select="attr[@name = 'example']" />
</literal> </literal>
</xsl:otherwise>
</xsl:choose>
</para> </para>
</xsl:if> </xsl:if>

View File

@ -30,9 +30,9 @@ in
{ {
options = { options = {
nixpkgs.config = pkgs.lib.mkOption { nixpkgs.config = mkOption {
default = {}; default = {};
example = example = literalExample
'' ''
{ firefox.enableGeckoMediaPlayer = true; { firefox.enableGeckoMediaPlayer = true;
packageOverrides = pkgs: { packageOverrides = pkgs: {
@ -54,7 +54,7 @@ in
''; '';
}; };
nixpkgs.system = pkgs.lib.mkOption { nixpkgs.system = mkOption {
default = ""; default = "";
description = '' description = ''
Specifies the Nix platform type for which NixOS should be built. Specifies the Nix platform type for which NixOS should be built.