ngz pushed a commit to branch tex-team in repository guix. commit ecfbd227446e21160fb587d49fcfb2b5b97799fe Author: Nicolas Goaziou <m...@nicolasgoaziou.fr> AuthorDate: Sat May 11 16:43:05 2024 +0200
gnu: texlive-velthuis: Build executable. * gnu/packages/tex.scm (texlive-velthuis-bin): New variable. (texlive-velthuis)[arguments]<#:phases>: Include executable. [native-inputs]: Add TEXLIVE-VELTHUIS-BIN. * gnu/packages/tex.scm (texlive-bin): Do not build devnag. Change-Id: Ib101e7fd1f425d75c71e67f8a8ebbfb094161f90 --- gnu/packages/tex.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 1555c5450b..c7c2ddf167 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -704,6 +704,7 @@ and should be preferred to it whenever a package would otherwise depend on "axodraw2" "chktex" "cjkutils" + "devnag" "dvi2tty" "dvipng" "dvisvgm" @@ -32167,6 +32168,46 @@ Manuscripts Submitted to Biomedical Journals (also known as the Vancouver style).") (license license:lppl1.3+))) +(define texlive-velthuis-bin + (package + (inherit texlive-bin) + (name "texlive-velthuis-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" '("devnag")) + (delete-other-directories "texk" '()))))) + (arguments + (substitute-keyword-arguments (package-arguments texlive-bin) + ((#:configure-flags flags) + #~(cons* "--disable-all-pkgs" + "--enable-devnag" + (delete "--disable-devnag" #$flags))) + ((#:phases _) + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "utils/devnag" + (invoke "make" "check"))))) + (replace 'install + (lambda _ + (with-directory-excursion "utils/devnag" + (invoke "make" "install")))))))))) + (define-public texlive-velthuis (package (name "texlive-velthuis") @@ -32174,8 +32215,6 @@ style).") (source (texlive-origin name version (list "doc/generic/velthuis/" - "doc/man/man1/devnag.1" - "doc/man/man1/devnag.man1.pdf" "fonts/afm/public/velthuis/" "fonts/map/dvips/velthuis/" "fonts/source/public/velthuis/" @@ -32186,10 +32225,24 @@ style).") "tex/plain/velthuis/" "tex/xelatex/velthuis/") (base32 - "0h9maci6b65x7zy13v5j4vlr07lnghiwckh7bn4ix7d1wmh74bij"))) + "1cw78gwsna97405d42aaqv7gsjphfy95v5drzl6j5lls7pm35r1r"))) (outputs '("out" "doc")) (build-system texlive-build-system) - (native-inputs (list texlive-metafont)) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'install 'install-executable + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((source ((compose dirname dirname) + (search-input-file (or native-inputs inputs) + "bin/devnag"))) + (man (string-append #$output "/share/man"))) + (install-file (string-append source "/bin/devnag") + (string-append #$output "/bin")) + (mkdir-p man) + (copy-recursively (string-append source "/share/man") + man))))))) + (native-inputs (list texlive-metafont texlive-velthuis-bin)) (propagated-inputs (list texlive-xetex-devanagari)) (home-page "https://ctan.org/pkg/devanagari") (synopsis "Typeset Devanagari")