diff mbox series

[bug#65479,core-updates,v3,01/63] Partial revert d3a0869e9b667d563e7e877c93f30a70896c5831.

Message ID 3a2a3b969ad1d0aac1e459f4d28e8b732bb67bc8.1696881354.git.mirai@makinata.eu
State New
Headers show
Series Docbook & XML/SGML improvements | expand

Commit Message

Bruno Victal Oct. 9, 2023, 8:05 p.m. UTC
This reconciles the changes from d3a0869e9b667d563e7e877c93f30a70896c5831 and
a2ee092ff2f3c37be0d47fc19e6cd7aa84bd9490.
---
 gnu/packages/docbook.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index cbd1fe2f14..ead1235edf 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -582,6 +582,31 @@  (define-public dblatex
                (base32
                 "0yd09nypswy3q4scri1dg7dr99d7gd6r2dwx0xm81l9f4y32gs0n"))))
     (build-system python-build-system)
+    (arguments
+     (list
+      ;; Using setuptools causes an invalid "package_base" path in
+      ;; out/bin/.dblatex-real due to a missing leading '/'.  This is caused
+      ;; by dblatex's setup.py stripping the root path when creating the
+      ;; script.  (dblatex's setup.py still uses distutils and thus has to
+      ;; create the script by itself. The feature for creating scripts is one
+      ;; of setuptools' features.)
+      ;; See this thread for details:
+      ;; https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00030.html
+      #:use-setuptools? #f
+      #:tests? #f                       ;no test suite
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'wrap 'set-path
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((path (map (lambda (x)
+                                 (string-append (assoc-ref inputs x)
+                                                "/bin"))
+                               (list "libxslt"
+                                     "imagemagick" "inkscape"
+                                     "texlive-updmap.cfg"))))
+                ;; dblatex executes helper programs at runtime.
+                (wrap-program (string-append #$output "/bin/dblatex")
+                  `("PATH" ":" prefix ,path))))))))
     ;; TODO: Add fig2dev for fig2dev utility.
     (inputs
      (list (texlive-updmap.cfg (list texlive-anysize