[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/97: gnu: texlive-context: Fix "context" call.
From: |
guix-commits |
Subject: |
08/97: gnu: texlive-context: Fix "context" call. |
Date: |
Fri, 21 Jun 2024 08:22:43 -0400 (EDT) |
ngz pushed a commit to branch tex-team
in repository guix.
commit 1304921c51ed1661f21bcc67fd7ebe11eff598c9
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Tue May 28 21:19:59 2024 +0200
gnu: texlive-context: Fix "context" call.
* gnu/packages/tex.scm (texlive-context)[arguments]<#:phases>: Add a phase
to
locate "texmfcnf.lua" and another one to make "bin/context" effectively
executable. Remove meaningless symlinks, too.
Change-Id: Ie0df56da0b3a439cc53e4b15b0506907681ed13b
---
gnu/packages/tex.scm | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index a48ca3966d..3bfcd13e5a 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -58766,17 +58766,30 @@ a counter to be reset when another is incremented) and
(build-system texlive-build-system)
(arguments
(list
- #:link-scripts #~(list "context.lua" "mtxrun.lua")
+ #:link-scripts #~(list "mtxrun.lua")
#:phases
#~(modify-phases %standard-phases
- (add-after 'link-scripts 'add-symlinks
+ (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.
+ (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")
- (symlink "../share/texmf-dist/scripts/context/lua/context.lua"
- "context.lua")
- (symlink "../share/texmf-dist/scripts/context/lua/mtxrun.lua"
- "mtxrun.lua")
- (symlink "mtxrun" "luametatex")))))))
+ (call-with-output-file "context"
+ (lambda (port)
+ (format port "#!/bin/sh~%mtxrun --script context \"$@\"")))
+ (chmod "context" #o755)))))))
(propagated-inputs
(list texlive-amsfonts
texlive-lm
- 06/97: gnu: texlive-luatex: Set proper default values for "texmfcnf.lua"., (continued)
- 06/97: gnu: texlive-luatex: Set proper default values for "texmfcnf.lua"., guix-commits, 2024/06/21
- 04/97: gnu: texlive-libkpathsea: Use TEXLIVE-SOURCE., guix-commits, 2024/06/21
- 13/97: gnu: texlive-csplain: Fix build., guix-commits, 2024/06/21
- 11/97: gnu: tex.scm: Remove completed TODO., guix-commits, 2024/06/21
- 16/97: gnu: Add texlive-omegaware-bin., guix-commits, 2024/06/21
- 18/97: gnu: Add texlive-texware-bin., guix-commits, 2024/06/21
- 09/97: gnu: Add texlive-libptexenc., guix-commits, 2024/06/21
- 17/97: gnu: Add texlive-fontware-bin., guix-commits, 2024/06/21
- 01/97: gnu: texlive-libkpathsea: Fix TEXMFCACHE location., guix-commits, 2024/06/21
- 07/97: gnu: texlive-updmap.cfg: Fix font file creation in $HOME., guix-commits, 2024/06/21
- 08/97: gnu: texlive-context: Fix "context" call.,
guix-commits <=
- 05/97: gnu: texlive-libkpathsea: Better default values in "texmf.cnf"., guix-commits, 2024/06/21
- 12/97: gnu: texlive-xcjk2uni: Fix build., guix-commits, 2024/06/21
- 10/97: gnu: texlive-bin: Minimize build surface., guix-commits, 2024/06/21
- 15/97: gnu: Add texlive-mfware-bin., guix-commits, 2024/06/21
- 20/97: gnu: Add texlive-uptex-bin., guix-commits, 2024/06/21
- 21/97: gnu: Add texlive-ptex-bin., guix-commits, 2024/06/21
- 22/97: gnu: Add texlive-bibtex-bin., guix-commits, 2024/06/21
- 23/97: gnu: Add texlive-dvicopy-bin., guix-commits, 2024/06/21
- 26/97: gnu: Add texlive-aleph-bin., guix-commits, 2024/06/21
- 30/97: gnu: Add texlive-autosp-bin., guix-commits, 2024/06/21