ngz pushed a commit to branch tex-team
in repository guix.
commit d034480c7ba8f955f9e4a5fb4a7158c9b1d2606c
Author: Nicolas Goaziou <[email protected]>
AuthorDate: Sun May 12 18:28:32 2024 +0200
gnu: texlive-dvipos: Build executables.
* gnu/packages/tex.scm (texlive-dvipos): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `dvipos' as a single package.
Change-Id: I797fb886c9ebf78d141040da7949914bf3a2bb54
---
gnu/packages/tex.scm | 46 +++++++++++++++++++++++++++++++++++++---------
1 file changed, 37 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 3c20071f8f..d647f2c006 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34606,16 +34606,44 @@ not read the postamble, so it can be started before
TeX finishes.")
(define-public texlive-dvipos
(package
+ (inherit texlive-bin)
(name "texlive-dvipos")
- (version (number->string %texlive-revision))
- (source (texlive-origin
- name version
- (list "doc/man/man1/dvipos.1"
- "doc/man/man1/dvipos.man1.pdf")
- (base32
- "0dmaas4m9y4px53vlg0jr73xviki338fm2n176l8ldwqj0vvq1b8")))
- (outputs '("out" "doc"))
- (build-system texlive-build-system)
+ (source
+ (origin
+ (inherit texlive-source)
+ (modules '((guix build utils)
+ (ice-9 ftw)))
+ (snippet
+ #~(let ((delete-other-directories
+ (lambda (root keep)
+ (with-directory-excursion root
+ (for-each
+ delete-file-recursively
+ (scandir
+ "."
+ (lambda (file)
+ (and (not (member file (append keep '("." ".."))))
+ (eq? 'directory (stat:type (stat file)))))))))))
+ (delete-other-directories "libs" '())
+ (delete-other-directories "utils" '())
+ (delete-other-directories "texk" '("dvipos"))))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+ ((#:configure-flags flags)
+ #~(cons* "--disable-all-pkgs"
+ "--enable-dvipos"
+ (delete "--disable-dvipos" #$flags)))
+ ((#:phases _)
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "texk/dvipos"
+ (invoke "make" "check")))))
+ (replace 'install
+ (lambda _
+ (with-directory-excursion "texk/dvipos"
+ (invoke "make" "install"))))))))
(home-page "https://www.tug.org/texlive/")
(synopsis "Support DVI @samp{pos:} specials used by ConTeXt DVI output")
(description