ngz pushed a commit to branch tex-team
in repository guix.
commit 064fd1f511148e033dfafce55689465331e2f3ae
Author: Nicolas Goaziou <[email protected]>
AuthorDate: Sun May 12 18:22:55 2024 +0200
gnu: texlive-dvips: Build executables.
* gnu/packages/tex.scm (texlive-dvips-bin): New variable.
(texlive-dvips)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-DVIPS-BIN.
Change-Id: I897c222feca6ae864ef815f026a0318a4c150593
---
gnu/packages/tex.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 2acf2e605e..3c20071f8f 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -38875,6 +38875,53 @@ executable. A secondary design goal is to support as
many PDF features as
does pdfTeX.")
(license license:gpl3+)))
+(define texlive-dvips-bin
+ (package
+ (inherit texlive-bin)
+ (name "texlive-dvips-bin")
+ (source
+ (origin
+ (inherit texlive-source)
+ (modules '((guix build utils)
+ (ice-9 ftw)))
+ (snippet
+ #~(let ((delete-other-directories
+ (lambda (root dirs)
+ (with-directory-excursion root
+ (for-each
+ delete-file-recursively
+ (scandir "."
+ (lambda (file)
+ (and (not (member file (append '("." "..")
dirs)))
+ (eq? 'directory (stat:type (stat
file)))))))))))
+ (delete-other-directories "libs" '())
+ (delete-other-directories "utils" '())
+ ;; XXX: One test needs "texmf.cnf" file to be present in the tree.
+ (delete-other-directories "texk" '("dvipsk" "kpathsea" "tests"))
+ (with-directory-excursion "texk/kpathsea"
+ (for-each
+ delete-file-recursively
+ (scandir "." (lambda (f)
+ (not (member f '("." ".." "texmf.cnf")))))))))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+ ((#:configure-flags flags)
+ #~(cons* "--disable-all-pkgs"
+ "--enable-dvipsk"
+ (delete "--disable-dvipsk" #$flags)))
+ ((#:phases _)
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "texk/dvipsk"
+ (invoke "make" "check")))))
+ (replace 'install
+ (lambda _
+ (with-directory-excursion "texk/dvipsk"
+ (invoke "make" "install"))))))))
+ (inputs '())))
+
(define-public texlive-dvips
(package
(name "texlive-dvips")
@@ -38895,6 +38942,16 @@ does pdfTeX.")
"0x11wx9p16z4nxhlbfqlgi5svnr96j1hnvdl9fpv1sr3n1j8m79g")))
(outputs '("out" "doc"))
(build-system texlive-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'install-bin
+ (lambda _
+ (let ((source
+ #$(this-package-native-input "texlive-dvips-bin")))
+ (copy-recursively (string-append source "/bin")
+ (string-append #$output "/bin"))))))))
+ (native-inputs (list texlive-dvips-bin))
(home-page "https://ctan.org/pkg/dvips")
(synopsis "DVI to PostScript drivers")
(description