* Allow literal examples to be included in the manual.

svn path=/nixos/trunk/; revision=29025
wip/yesman
Eelco Dolstra 13 years ago
parent 5813e99fb3
commit 453675c5c1
  1. 14
      doc/manual/options-to-docbook.xsl
  2. 6
      modules/misc/nixpkgs.nix

@ -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>

@ -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.

Loading…
Cancel
Save