summary refs log tree commit diff
path: root/pkgs/data/sgml+xml/stylesheets
diff options
context:
space:
mode:
authorCorey O'Connor <coreyoconnor@gmail.com>2018-03-22 11:55:19 -0700
committerMatthew Bauer <mjbauer95@gmail.com>2018-04-17 20:59:51 -0500
commit5ffdcd32ef64ec433245e569227ca6b60f34314f (patch)
treed5cb2d96500dd6cb20485bf7dcaa54f09b859625 /pkgs/data/sgml+xml/stylesheets
parentf8bf6a9c3fcbff4988635287f0be760906995a65 (diff)
downloadnixpkgs-5ffdcd32ef64ec433245e569227ca6b60f34314f.tar
nixpkgs-5ffdcd32ef64ec433245e569227ca6b60f34314f.tar.gz
nixpkgs-5ffdcd32ef64ec433245e569227ca6b60f34314f.tar.bz2
nixpkgs-5ffdcd32ef64ec433245e569227ca6b60f34314f.tar.lz
nixpkgs-5ffdcd32ef64ec433245e569227ca6b60f34314f.tar.xz
nixpkgs-5ffdcd32ef64ec433245e569227ca6b60f34314f.tar.zst
nixpkgs-5ffdcd32ef64ec433245e569227ca6b60f34314f.zip
docbook-xsl-ns: Add patch to avoid infinite recursion.
Fixes #39090
Diffstat (limited to 'pkgs/data/sgml+xml/stylesheets')
-rw-r--r--pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix3
-rw-r--r--pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/docbook-xsl-ns-infinite.patch31
2 files changed, 33 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 e965882a9c3..ef7b1f93d74 100644
--- a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix
+++ b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix
@@ -60,6 +60,7 @@ in {
   docbook_xsl_ns = common {
     pname = "docbook-xsl-ns";
     sha256 = "170ggf5dgjar65kkn5n33kvjr3pdinpj66nnxfx8b2avw0k91jin";
-  };
 
+    patches = [ ./docbook-xsl-ns-infinite.patch ];
+  };
 }
diff --git a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/docbook-xsl-ns-infinite.patch b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/docbook-xsl-ns-infinite.patch
new file mode 100644
index 00000000000..a0f5eff14db
--- /dev/null
+++ b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/docbook-xsl-ns-infinite.patch
@@ -0,0 +1,31 @@
+Description: Remove infinite recursion
+Attribute: docbook5_xsl
+Version: 1.79.1
+URL: https://github.com/NixOS/nixpkgs/issues/39090
+diff -ru a/lib/lib.xsl b/lib/lib.xsl
+--- a/lib/lib.xsl	2015-12-26 15:15:37.000000000 -0800
++++ b/lib/lib.xsl	2018-03-22 11:52:45.311949264 -0700
+@@ -11,8 +11,11 @@
+ 
+      ******************************************************************** -->
+ <xsl:stylesheet exclude-result-prefixes="d"
+-                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook"
+-version="1.0">
++                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
++                xmlns:d="http://docbook.org/ns/docbook"
++                xmlns:str="http://exslt.org/strings"
++                exclude-result-prefixes="str"
++                version="1.0">
+ 
+ <xsl:template name="dot.count">
+   <!-- Returns the number of "." characters in a string -->
+@@ -58,6 +61,9 @@
+   <xsl:param name="replacement"/>
+ 
+   <xsl:choose>
++    <xsl:when test="function-available('str:replace')">
++      <xsl:value-of select="str:replace($string, string($target), string($replacement))"/>
++    </xsl:when>
+     <xsl:when test="contains($string, $target)">
+       <xsl:variable name="rest">
+         <xsl:call-template name="string.subst">