ngz pushed a commit to branch tex-team
in repository guix.
commit 23721716b6f501767cee5ce9d3a692ca1207a973
Author: Nicolas Goaziou <[email protected]>
AuthorDate: Sun May 12 12:18:01 2024 +0200
gnu: texlive-vlna: Build executable.
* gnu/packages/tex.scm (texlive-vlna-bin): New variable.
(texlive-vlna)[arguments]<#:phases>: Include executable.
[native-inputs]: Add TEXLIVE-VLNA-BIN.
* gnu/packages/tex.scm (texlive-bin): Do not build vlna.
Change-Id: I5ac958d7a0d62fc3b94c6b63137482e56b14b8ae
---
gnu/packages/tex.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 4d0e3c1652..c755f3fec9 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -776,6 +776,7 @@ and should be preferred to it whenever a package would
otherwise depend on
"texdoctk"
"tpic2pdftex"
"upmendex"
+ "vlna"
"xindy"
"xml2pmx"
"xpdfopen"))))
@@ -32428,6 +32429,48 @@ strong on layout, from simple alternate-line
indentation to the @code{Mouse's
tale} from @emph{Alice in Wonderland}.")
(license license:lppl)))
+(define texlive-vlna-bin
+ (package
+ (inherit texlive-bin)
+ (name "texlive-vlna-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" '("vlna"))
+ (delete-other-directories "texk" '())))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+ ((#:configure-flags flags)
+ #~(cons* "--disable-all-pkgs"
+ "--enable-vlna"
+ (delete "--disable-vlna" #$flags)))
+ ((#:phases _)
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "utils/vlna"
+ (invoke "make" "check")))))
+ (replace 'install
+ (lambda _
+ (with-directory-excursion "utils/vlna"
+ (invoke "make" "install"))))))))
+ (native-inputs '())
+ (inputs '())))
+
(define-public texlive-vlna
(package
(name "texlive-vlna")
@@ -32440,6 +32483,16 @@ tale} from @emph{Alice in Wonderland}.")
"0nfb7mj6y9d4n89z59ppi96grfylwky97mxcv9rjflr5kpqlpga2")))
(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-vlna-bin")))
+ (copy-recursively (string-append source "/bin")
+ (string-append #$output "/bin"))))))))
+ (native-inputs (list texlive-vlna-bin))
(home-page "https://ctan.org/pkg/vlna")
(synopsis "Add @samp{~} after non-syllabic preposition, for Czech/Slovak")
(description