diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2024-05-30 23:45:32 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-08-31 10:45:21 +0200 |
commit | a805519ebc61f7909dc404f06139bd3af5455ac8 (patch) | |
tree | c69703155b5c8fe16467c65fbac290f267dd75bf /gnu/packages/tex.scm | |
parent | b55ce32ed2696519c325d7bfef4892ab642cb62b (diff) | |
download | guix-a805519ebc61f7909dc404f06139bd3af5455ac8.tar guix-a805519ebc61f7909dc404f06139bd3af5455ac8.tar.gz |
gnu: texlive-latex-bin: Create symlinks for "latex" variants.
* gnu/packages/tex.scm (texlive-latex-bin)[arguments]<#:phases>: Create
symlinks for "latex" variants.
* gnu/packages/tex.scm (texlive-bin)[arguments]<#:phases>: Remove symlink
creation.
Change-Id: Ib4f1b05082572e8ccb7f5dd5531ed30cf404ce29
Diffstat (limited to 'gnu/packages/tex.scm')
-rw-r--r-- | gnu/packages/tex.scm | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 1bddc55d6c..d4913e4755 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -784,23 +784,20 @@ and should be preferred to it whenever a package would otherwise depend on (("/usr/include /usr/local/include") (string-append #$(this-package-input "texlive-libkpathsea") "/include")))))) - (add-after 'install 'maybe-create-symlinks - ;; Create symbolic links for the latex variants. We link lualatex - ;; to luahbtex; see issue #51252 for details. + (add-after 'install 'maybe-clear-symlinks + ;; XXX: No matter the combination of configure flags, process + ;; insists on creating those dangling links, resulting in an error + ;; during `validate-runpath' phase. ;; - ;; Make it conditional so packages inheriting from this one do not - ;; need to remove this phase. + ;; Make it specific to TEXLIVE-BIN package by verifying the + ;; existence of "tex" binary so that packages inheriting from this + ;; one do not need to remove the phase. (lambda _ - (with-directory-excursion (string-append #$output "/bin/") - (when (file-exists? "tex") ;for TEXLIVE-BIN only - (for-each symlink - '("pdftex" "pdftex" "luahbtex") - '("latex" "pdflatex" "lualatex")) - ;; XXX: No matter the combination of configure flags, - ;; process insists on creating those dangling links, - ;; resulting in an error during `validate-runpath' phase. - (for-each delete-file - '("pbibtex" "pdvitype" "ppltotf" "ptftopl")))))) + (let ((bin (string-append #$output "/bin/"))) + (when (file-exists? (string-append bin "tex")) + (with-directory-excursion bin + (for-each delete-file + '("pbibtex" "pdvitype" "ppltotf" "ptftopl"))))))) (add-after 'install 'remove-documentation ;; Documentation is provided by specific TeX Live packages, in ;; a dedicated "doc" output. Ignore documentation generated when @@ -46024,7 +46021,21 @@ formats.") (arguments (list #:texlive-latex-bin? #f - #:create-formats #~(list "dvilualatex" "latex" "lualatex" "pdflatex"))) + #:create-formats #~(list "dvilualatex" "latex" "lualatex" "pdflatex") + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'symlink-binaries + ;; Create symbolic links for the latex variants. We link lualatex + ;; to luahbtex; see issue #51252 for details. + (lambda* (#:key inputs #:allow-other-keys) + (let ((pdftex (search-input-file inputs "bin/pdftex")) + (luahbtex (search-input-file inputs "bin/luahbtex")) + (bin (string-append #$output "/bin"))) + (mkdir-p bin) + (with-directory-excursion bin + (symlink pdftex "latex") + (symlink pdftex "pdflatex") + (symlink luahbtex "lualatex")))))))) (propagated-inputs (list texlive-atbegshi texlive-atveryend |