diff options
author | Naïm Favier <n@monade.li> | 2022-12-02 09:15:03 +0100 |
---|---|---|
committer | pennae <82953136+pennae@users.noreply.github.com> | 2022-12-08 17:52:52 +0100 |
commit | 109f8b46575c5cc5e3208e4709d89f39f3a83dd1 (patch) | |
tree | c6f321739f283fa152d5a9c5a8fdbcf9b9d414e6 /nixos/lib/make-options-doc | |
parent | 6a117e2759b84b9508f1d69cb5be54ca331bff98 (diff) | |
download | nixpkgs-109f8b46575c5cc5e3208e4709d89f39f3a83dd1.tar nixpkgs-109f8b46575c5cc5e3208e4709d89f39f3a83dd1.tar.gz nixpkgs-109f8b46575c5cc5e3208e4709d89f39f3a83dd1.tar.bz2 nixpkgs-109f8b46575c5cc5e3208e4709d89f39f3a83dd1.tar.lz nixpkgs-109f8b46575c5cc5e3208e4709d89f39f3a83dd1.tar.xz nixpkgs-109f8b46575c5cc5e3208e4709d89f39f3a83dd1.tar.zst nixpkgs-109f8b46575c5cc5e3208e4709d89f39f3a83dd1.zip |
nixos/make-options-doc: remove dead code
The logic for pretty-printing Nix values isn't needed any more because `optionAttrSetToDocList` returns already rendered values.
Diffstat (limited to 'nixos/lib/make-options-doc')
-rw-r--r-- | nixos/lib/make-options-doc/options-to-docbook.xsl | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/nixos/lib/make-options-doc/options-to-docbook.xsl b/nixos/lib/make-options-doc/options-to-docbook.xsl index 0fe14a6d2d1..ac49659c681 100644 --- a/nixos/lib/make-options-doc/options-to-docbook.xsl +++ b/nixos/lib/make-options-doc/options-to-docbook.xsl @@ -138,82 +138,6 @@ </xsl:template> - <xsl:template match="string[contains(@value, '
')]" mode="top"> - <programlisting> - <xsl:text>''
</xsl:text> - <xsl:value-of select='str:replace(str:replace(@value, "''", "'''"), "${", "''${")' /> - <xsl:text>''</xsl:text> - </programlisting> - </xsl:template> - - - <xsl:template match="*" mode="top"> - <literal><xsl:apply-templates select="." /></literal> - </xsl:template> - - - <xsl:template match="null"> - <xsl:text>null</xsl:text> - </xsl:template> - - - <xsl:template match="string"> - <xsl:choose> - <xsl:when test="(contains(@value, '"') or contains(@value, '\')) and not(contains(@value, '
'))"> - <xsl:text>''</xsl:text><xsl:value-of select='str:replace(str:replace(@value, "''", "'''"), "${", "''${")' /><xsl:text>''</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:text>"</xsl:text><xsl:value-of select="str:replace(str:replace(str:replace(str:replace(@value, '\', '\\'), '"', '\"'), '
', '\n'), '${', '\${')" /><xsl:text>"</xsl:text> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - - <xsl:template match="int"> - <xsl:value-of select="@value" /> - </xsl:template> - - - <xsl:template match="bool[@value = 'true']"> - <xsl:text>true</xsl:text> - </xsl:template> - - - <xsl:template match="bool[@value = 'false']"> - <xsl:text>false</xsl:text> - </xsl:template> - - - <xsl:template match="list"> - [ - <xsl:for-each select="*"> - <xsl:apply-templates select="." /> - <xsl:text> </xsl:text> - </xsl:for-each> - ] - </xsl:template> - - - <xsl:template match="attrs[attr[@name = '_type' and string[@value = 'literalExpression']]]"> - <xsl:value-of select="attr[@name = 'text']/string/@value" /> - </xsl:template> - - - <xsl:template match="attrs"> - { - <xsl:for-each select="attr"> - <xsl:value-of select="@name" /> - <xsl:text> = </xsl:text> - <xsl:apply-templates select="*" /><xsl:text>; </xsl:text> - </xsl:for-each> - } - </xsl:template> - - - <xsl:template match="attrs[attr[@name = '_type' and string[@value = 'derivation']]]"> - <replaceable>(build of <xsl:value-of select="attr[@name = 'name']/string/@value" />)</replaceable> - </xsl:template> - <xsl:template match="attr[@name = 'declarations' or @name = 'definitions']"> <simplelist> <!-- @@ -275,10 +199,4 @@ </simplelist> </xsl:template> - - <xsl:template match="function"> - <xsl:text>λ</xsl:text> - </xsl:template> - - </xsl:stylesheet> |