mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 13:09:23 -05:00
gnu: docbook: Refactor dblatex packages.
* gnu/packages/docbook.scm (dblatex): Rewrite using G-Expressions. (dblatex/stable): Use modify-inputs. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: Ic4c974c60a80871c5bf4764b88b913c871208b3f
This commit is contained in:
parent
69eea259df
commit
b7947e53d9
1 changed files with 36 additions and 34 deletions
|
@ -37,6 +37,7 @@ (define-module (gnu packages docbook)
|
||||||
#:use-module (gnu packages python)
|
#:use-module (gnu packages python)
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
#:use-module (gnu packages web-browsers)
|
#:use-module (gnu packages web-browsers)
|
||||||
|
#:use-module (gnu packages xfig)
|
||||||
#:use-module (gnu packages xml)
|
#:use-module (gnu packages xml)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
@ -44,7 +45,6 @@ (define-module (gnu packages docbook)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module ((guix build utils) #:select (alist-replace))
|
|
||||||
#:use-module (guix build-system copy)
|
#:use-module (guix build-system copy)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (guix build-system trivial)
|
#:use-module (guix build-system trivial)
|
||||||
|
@ -600,9 +600,33 @@ (define-public dblatex
|
||||||
(base32
|
(base32
|
||||||
"0yd09nypswy3q4scri1dg7dr99d7gd6r2dwx0xm81l9f4y32gs0n"))))
|
"0yd09nypswy3q4scri1dg7dr99d7gd6r2dwx0xm81l9f4y32gs0n"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
;; TODO: Add fig2dev for fig2dev utility.
|
(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))))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("texlive" ,(texlive-updmap.cfg (list texlive-anysize
|
(list (texlive-updmap.cfg (list texlive-anysize
|
||||||
texlive-appendix
|
texlive-appendix
|
||||||
texlive-changebar
|
texlive-changebar
|
||||||
texlive-fancybox
|
texlive-fancybox
|
||||||
|
@ -619,35 +643,13 @@ (define-public dblatex
|
||||||
texlive-stmaryrd
|
texlive-stmaryrd
|
||||||
texlive-subfigure
|
texlive-subfigure
|
||||||
texlive-titlesec
|
texlive-titlesec
|
||||||
texlive-wasysym)))
|
texlive-wasysym))
|
||||||
("imagemagick" ,imagemagick) ;for convert
|
;; FIXME: transfig causes the build to fail.
|
||||||
("inkscape" ,inkscape/stable) ;for svg conversion
|
;;transfig ;for fig2dev
|
||||||
("docbook" ,docbook-xml)
|
imagemagick ;for convert
|
||||||
("libxslt" ,libxslt))) ;for xsltproc
|
inkscape/stable ;for svg conversion
|
||||||
(arguments
|
docbook-xml
|
||||||
`( ;; Using setuptools causes an invalid "package_base" path in
|
libxslt)) ;for xsltproc
|
||||||
;; 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' command
|
|
||||||
#:phases
|
|
||||||
(modify-phases %standard-phases
|
|
||||||
(add-after 'wrap 'set-path
|
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
||||||
(let ((out (assoc-ref outputs "out")))
|
|
||||||
;; dblatex executes helper programs at runtime.
|
|
||||||
(wrap-program (string-append out "/bin/dblatex")
|
|
||||||
`("PATH" ":" prefix
|
|
||||||
,(map (lambda (input)
|
|
||||||
(string-append (assoc-ref inputs input)
|
|
||||||
"/bin"))
|
|
||||||
'("libxslt" "texlive"
|
|
||||||
"imagemagick" "inkscape"))))))))))
|
|
||||||
(home-page "https://dblatex.sourceforge.net")
|
(home-page "https://dblatex.sourceforge.net")
|
||||||
(synopsis "DocBook to LaTeX Publishing")
|
(synopsis "DocBook to LaTeX Publishing")
|
||||||
(description
|
(description
|
||||||
|
@ -666,8 +668,8 @@ (define-public dblatex
|
||||||
(define-public dblatex/stable
|
(define-public dblatex/stable
|
||||||
(hidden-package
|
(hidden-package
|
||||||
(package/inherit dblatex
|
(package/inherit dblatex
|
||||||
(inputs (alist-replace "imagemagick" `(,imagemagick/stable)
|
(inputs (modify-inputs (package-inputs dblatex)
|
||||||
(package-inputs dblatex))))))
|
(replace "imagemagick" imagemagick/stable))))))
|
||||||
|
|
||||||
(define-public docbook-utils
|
(define-public docbook-utils
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Reference in a new issue