[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
135/141: gnu: texlive-context: Fix context executable.
From: |
guix-commits |
Subject: |
135/141: gnu: texlive-context: Fix context executable. |
Date: |
Wed, 26 Jun 2024 06:35:08 -0400 (EDT) |
ngz pushed a commit to branch tex-team
in repository guix.
commit 9368a1ab27f352bab6fe766f4b56957f19106349
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Mon Jun 24 00:57:27 2024 +0200
gnu: texlive-context: Fix context executable.
* gnu/packages/tex.scm (texlive-context)[arguments]<#:link-scripts>:
"mtxrun.lua" is not meant to be symlinked to "/bin"
<#:phases>: Find another way to force using "texmfcnf.lua" from
TEXLIVE-LUATEX
input. Install "context" and "mtxrun" scripts in "/bin".
Change-Id: Ifc62772d6cc4dff1636f0e8c9470a91d8be69229
---
gnu/packages/tex.scm | 52 ++++++++++++++++++++++++++++++++--------------------
1 file changed, 32 insertions(+), 20 deletions(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 2421ee4514..c1953692bc 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -73738,30 +73738,42 @@ a counter to be reset when another is incremented) and
(build-system texlive-build-system)
(arguments
(list
- #:link-scripts #~(list "mtxrun.lua")
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'locate-texmfcnf.lua
- ;; Out of the box, "mtxrun" first looks for "texmfcnf.lua" in
- ;; "~/texmf", then in TEXMFCNF. The latter is set within
- ;; TEXLIVE-LIBKPATHSEA; it cannot contain the configuration file
- ;; provided by TEXLIVE-LUATEX. Point to the right file instead.
+ (add-after 'install 'install-executables
(lambda* (#:key inputs #:allow-other-keys)
- (let ((texmfcnf.lua
- (search-input-file inputs
-
"share/texmf-dist/web2c/texmfcnf.lua")))
- (substitute* (find-files "." "\\.lua$")
- (("kpse\\.default_texmfcnf\\(\\)")
- (format #f "\"~a\"" (dirname texmfcnf.lua)))))))
- (add-after 'unpack 'create-context-wrapper
- ;; Create a "context" script for convenience.
- (lambda _
- (mkdir-p (string-append #$output "/bin"))
- (with-directory-excursion (string-append #$output "/bin")
- (call-with-output-file "context"
+ (let* ((bin (string-append #$output "/bin"))
+ (context (string-append bin "/context"))
+ (mtxrun (string-append bin "/mtxrun"))
+ (texmfcnf.lua
+ (search-input-file inputs
+
"share/texmf-dist/web2c/texmfcnf.lua"))
+ (sh (search-input-file inputs "bin/sh")))
+ (mkdir-p bin)
+ ;; Create "mtxrun" runner.
+ ;;
+ ;; Out of the box, "mtxrun" first looks for "texmfcnf.lua" in
+ ;; "~/texmf", then in TEXMFCNF. The latter is set within
+ ;; TEXLIVE-LIBKPATHSEA; it cannot contain the configuration
+ ;; file provided by TEXLIVE-LUATEX. Point to the right file
+ ;; instead.
+ (call-with-output-file mtxrun
+ (lambda (port)
+ (format port
+ "#!~a~%env ~a ~a luatex --luaonly mtxrun.lua
\"$@\""
+ sh
+ (string-append "LUATEXDIR="
+ #$output
+
"/share/texmf-dist/scripts/context/lua")
+ (format #f
+ "TEXMFCNF={$HOME/texmf/web2c,~a}"
+ (dirname texmfcnf.lua)))))
+ (chmod mtxrun #o755)
+ ;; Create "context" runner.
+ (call-with-output-file context
(lambda (port)
- (format port "#!/bin/sh~%mtxrun --script context \"$@\"")))
- (chmod "context" #o755)))))))
+ (format port "#!~a~%mtxrun --script context \"$@\"" sh)))
+ (chmod context #o755)))))))
(propagated-inputs
(list texlive-amsfonts
texlive-context-companion-fonts
- 119/141: gnu: texlive-pstricks-calcnotes: Specify upstream name., (continued)
- 119/141: gnu: texlive-pstricks-calcnotes: Specify upstream name., guix-commits, 2024/06/26
- 122/141: gnu: texlive-amstex: Create missing symlink., guix-commits, 2024/06/26
- 126/141: gnu: texlive-mex: Create missing symlinks., guix-commits, 2024/06/26
- 130/141: gnu: texlive-uplatex: Create missing symlink., guix-commits, 2024/06/26
- 123/141: gnu: texlive-csplain: Create missing symlinks., guix-commits, 2024/06/26
- 125/141: gnu: texlive-lollipop: Create missing symlink., guix-commits, 2024/06/26
- 129/141: gnu: texlive-platex: Create missing symlink., guix-commits, 2024/06/26
- 131/141: gnu: texlive-texsis: Create missing symlink., guix-commits, 2024/06/26
- 132/141: gnu: texlive-xmltex: Remove useless binding., guix-commits, 2024/06/26
- 139/141: gnu: texlive-extract: Skip build., guix-commits, 2024/06/26
- 135/141: gnu: texlive-context: Fix context executable.,
guix-commits <=
- 127/141: gnu: texlive-mltex: Create missing symlinks., guix-commits, 2024/06/26
- 138/141: gnu: texlive-luatex: Generate "luatex.fmt" and "dviluatex.fmt"., guix-commits, 2024/06/26
- 141/141: gnu: texlive-xpinyin: Skip build., guix-commits, 2024/06/26
- 134/141: gnu: Update TeX Live to 2024.2., guix-commits, 2024/06/26
- 137/141: gnu: tex: Add comments about TeX Live updating process., guix-commits, 2024/06/26
- 128/141: gnu: texlive-optex: Create missing symlink., guix-commits, 2024/06/26
- 124/141: gnu: texlive-eplain: Create missing symlink., guix-commits, 2024/06/26
- 133/141: gnu: texlive-jadetex: Small refactoring., guix-commits, 2024/06/26
- 140/141: gnu: texlive-autopdf: Fix build., guix-commits, 2024/06/26
- 136/141: gnu: texlive-luajittex-bin: Skip build on ppc64le and riscv64 architectures., guix-commits, 2024/06/26