ngz pushed a commit to branch tex-team in repository guix. commit 1bffd3ffecfd2c07bd442965e405d635c26ae2f5 Author: Nicolas Goaziou <m...@nicolasgoaziou.fr> AuthorDate: Sun May 12 12:24:47 2024 +0200
gnu: texlive-pmx: Build executables. * gnu/packages/tex.scm (texlive-pmx-bin): New variable. (texlive-pmx)[arguments]<#:phases>: Include executable. [native-inputs]: Add TEXLIVE-PMX-BIN. * gnu/packages/tex.scm (texlive-bin): Do not build pmx. Change-Id: I95f45fc58053b81f6b6935255fc90bcb18b74713 --- gnu/packages/tex.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index c755f3fec9..17f28ab9a4 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -770,6 +770,7 @@ and should be preferred to it whenever a package would otherwise depend on "kpathsea" "lacheck" "lcdf-typetools" + "pmx" "ps2eps" "psutils" "t1utils" @@ -25466,6 +25467,48 @@ to typeset Korean letters (Hangul) using the proper fonts. The use of XeLaTeX is recommended.") (license license:lppl1.3+))) +(define texlive-pmx-bin + (package + (inherit texlive-bin) + (name "texlive-pmx-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" '("pmx")) + (delete-other-directories "texk" '()))))) + (arguments + (substitute-keyword-arguments (package-arguments texlive-bin) + ((#:configure-flags flags) + #~(cons* "--disable-all-pkgs" + "--enable-pmx" + (delete "--disable-pmx" #$flags))) + ((#:phases _) + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "utils/pmx" + (invoke "make" "check"))))) + (replace 'install + (lambda _ + (with-directory-excursion "utils/pmx" + (invoke "make" "install")))))))) + (native-inputs '()) + (inputs '()))) + (define-public texlive-pmx (package (name "texlive-pmx") @@ -25482,6 +25525,16 @@ is recommended.") "1p9js9izv50vg7qqqmyg5jz4am4phhscqdfnn4nszlyfv3zkg7p3"))) (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-pmx-bin"))) + (copy-recursively (string-append source "/bin") + (string-append #$output "/bin")))))))) + (native-inputs (list texlive-pmx-bin)) (home-page "https://ctan.org/pkg/pmx") (synopsis "Preprocessor for MusiXTeX") (description