diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2022-03-31 02:34:42 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2022-04-03 21:22:47 +0200 |
commit | 84d6565d52d1f9f25280f8dc1716b90238fbb738 (patch) | |
tree | 468b18816b47ddd8aa83c7ccf7104701706cdd49 /pkgs/data/sgml+xml | |
parent | 05a6c124e65d30b5e68468c8b87f73d6b1a8c587 (diff) |
nixos/man: prevent duplication of options
libxslt 1.1.35 fixed conflict resolution for templates to match the specification. This uncovered a bug in docbook-xsl (https://github.com/docbook/xslt10-stylesheets/issues/240), which causes option names to be duplicated into the option descriptions. Let’s resolve the conflict by patching the stylesheets. Fixes: https://github.com/NixOS/nixpkgs/issues/166304
Diffstat (limited to 'pkgs/data/sgml+xml')
-rw-r--r-- | pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix | 6 | ||||
-rw-r--r-- | pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/fix-man-options-duplication.patch | 11 |
2 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix index 735dfdb4f81b3..2f9d22e57d89e 100644 --- a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix +++ b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, substituteAll, fetchurl, fetchpatch, findXMLCatalogs, writeScriptBin, ruby, bash }: +{ lib, stdenv, substituteAll, fetchurl, fetchpatch, findXMLCatalogs, writeScriptBin, ruby, bash, withManOptDedupPatch ? false }: let @@ -36,6 +36,10 @@ let src = ./catalog-legacy-uris.patch; inherit legacySuffix suffix version; }) + ] ++ lib.optionals withManOptDedupPatch [ + # Fixes https://github.com/NixOS/nixpkgs/issues/166304 + # https://github.com/docbook/xslt10-stylesheets/pull/241 + ./fix-man-options-duplication.patch ]; propagatedBuildInputs = [ findXMLCatalogs ]; diff --git a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/fix-man-options-duplication.patch b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/fix-man-options-duplication.patch new file mode 100644 index 0000000000000..304d9781e6aab --- /dev/null +++ b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/fix-man-options-duplication.patch @@ -0,0 +1,11 @@ +--- a/manpages/lists.xsl ++++ b/manpages/lists.xsl +@@ -110,7 +110,7 @@ + <xsl:text>.RE </xsl:text> + </xsl:template> + +-<xsl:template match="d:varlistentry/d:term"/> ++<xsl:template match="d:varlistentry/d:term" priority="1"/> + <xsl:template match="d:glossentry/d:glossterm"/> + + <xsl:template match="d:variablelist[ancestor::d:listitem or ancestor::d:step or ancestor::d:glossdef]| |