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 735dfdb4f81b..2f9d22e57d89 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 000000000000..304d9781e6aa
--- /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 @@
+ .RE
+
+
+-
++
+
+
+