* 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>
<xsl:if test="attr[@name = 'example']">
<para>
<emphasis>Example:</emphasis>
<xsl:text> </xsl:text>
<literal>
<xsl:apply-templates select="attr[@name = 'example']" />
</literal>
<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>
<xsl:apply-templates select="attr[@name = 'example']" />
</literal>
</xsl:otherwise>
</xsl:choose>
</para>
</xsl:if>

View file

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