Merge pull request #166509 from jtojnar/man-opt-nodup

nixos/man: prevent duplication of options

authored by

Lassulus and committed by
GitHub
c274af4b df7337eb

+20 -1
+4
nixos/doc/manual/default.nix
··· 14 14 let 15 15 lib = pkgs.lib; 16 16 17 + docbook_xsl_ns = pkgs.docbook-xsl-ns.override { 18 + withManOptDedupPatch = true; 19 + }; 20 + 17 21 # We need to strip references to /nix/store/* from options, 18 22 # including any `extraSources` if some modules came from elsewhere, 19 23 # or else the build will fail.
+5 -1
pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix
··· 1 - { lib, stdenv, substituteAll, fetchurl, fetchpatch, findXMLCatalogs, writeScriptBin, ruby, bash }: 1 + { lib, stdenv, substituteAll, fetchurl, fetchpatch, findXMLCatalogs, writeScriptBin, ruby, bash, withManOptDedupPatch ? false }: 2 2 3 3 let 4 4 ··· 36 36 src = ./catalog-legacy-uris.patch; 37 37 inherit legacySuffix suffix version; 38 38 }) 39 + ] ++ lib.optionals withManOptDedupPatch [ 40 + # Fixes https://github.com/NixOS/nixpkgs/issues/166304 41 + # https://github.com/docbook/xslt10-stylesheets/pull/241 42 + ./fix-man-options-duplication.patch 39 43 ]; 40 44 41 45 propagatedBuildInputs = [ findXMLCatalogs ];
+11
pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/fix-man-options-duplication.patch
··· 1 + --- a/manpages/lists.xsl 2 + +++ b/manpages/lists.xsl 3 + @@ -110,7 +110,7 @@ 4 + <xsl:text>.RE&#10;</xsl:text> 5 + </xsl:template> 6 + 7 + -<xsl:template match="d:varlistentry/d:term"/> 8 + +<xsl:template match="d:varlistentry/d:term" priority="1"/> 9 + <xsl:template match="d:glossentry/d:glossterm"/> 10 + 11 + <xsl:template match="d:variablelist[ancestor::d:listitem or ancestor::d:step or ancestor::d:glossdef]|