ngz pushed a commit to branch tex-team
in repository guix.
commit f4d1f94e71849318c01deeee5a6b51814aa9ae7f
Author: Nicolas Goaziou <[email protected]>
AuthorDate: Sun May 12 17:39:28 2024 +0200
gnu: texlive-makeindex: Build executables.
* gnu/packages/tex.scm (texlive-makeindex-bin): New variable.
(texlive-makeindex)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-MAKEINDEX-BIN.
Change-Id: I60ab3dd2ab1acff58f6d8b9018d74ef0af0454f4
---
gnu/packages/tex.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 178f39ca59..644ef64cb6 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -54489,6 +54489,47 @@ always (re)defines a command. There is also
@code{\\makeenvironment} and
@code{\\provideenvironment} for environments.")
(license license:lppl1.3c+)))
+(define texlive-makeindex-bin
+ (package
+ (inherit texlive-bin)
+ (name "texlive-makeindex-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 "texk" '("makeindexk" "tests"))
+ (delete-other-directories "utils" '())))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+ ((#:configure-flags flags)
+ #~(cons* "--disable-all-pkgs"
+ "--enable-makeindexk"
+ (delete "--disable-makeindexk" #$flags)))
+ ((#:phases _)
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "texk/makeindexk"
+ (invoke "make" "check")))))
+ (replace 'install
+ (lambda _
+ (with-directory-excursion "texk/makeindexk"
+ (invoke "make" "install"))))))))
+ (inputs '())))
+
(define-public texlive-makeindex
(package
(name "texlive-makeindex")
@@ -54506,6 +54547,16 @@ always (re)defines a command. There is also
@code{\\makeenvironment} and
"0m01m0x1kf10yvzxgrkvpic0amsr0g6q2r2wsg5f4ngybq4y9gyi")))
(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-makeindex-bin")))
+ (copy-recursively (string-append source "/bin")
+ (string-append #$output "/bin"))))))))
+ (native-inputs (list texlive-makeindex-bin))
(home-page "https://ctan.org/pkg/makeindexk")
(synopsis "Makeindex development sources")
(description