This is an automated email from the git hooks/post-receive script.

ngz pushed a commit to branch tex-team
in repository guix.

The following commit(s) were added to refs/heads/tex-team by this push:
     new c7bb8563af gnu: texlive-libkpathsea: Tweak "texmf.cnf" variables.
c7bb8563af is described below

commit c7bb8563af237aa4cdc6255ae0ed173d996101e7
Author: Nicolas Goaziou <m...@nicolasgoaziou.fr>
AuthorDate: Sat Mar 29 14:59:25 2025 +0100

    gnu: texlive-libkpathsea: Tweak "texmf.cnf" variables.
    
    * gnu/packages/tex.scm (texlive-libkpathsea): Use XDG variables instead of
    HOME for cache and user configuration.  Re-instate TEXMFLOCAL, which may be
    necessary for external TeX installations.
    (texlive-luatex): Re-instate TEXFLOCAL.
    
    Change-Id: I8bd4a60c5e9a8f380873e5f812b2749a7302c93b
---
 gnu/packages/tex.scm | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index afba6df9ae..6cf4cfa50a 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -339,14 +339,18 @@ should not be installed in a profile.")
               (substitute* "texk/kpathsea/texmf.cnf"
                 (("^TEXMFROOT = .*") "TEXMFROOT = {$GUIX_TEXMF}/..\n")
                 (("^TEXMFDIST = .*") "TEXMFDIST = {$GUIX_TEXMF}\n")
+                ;; Use XDG recommendations for local variables.  Also ignore
+                ;; system-wide cache, which is not writable; use local one
+                ;; instead, i.e., "$XDG_CACHE_HOME/.texliveYYYY/texmf-var/".
+                (("^TEXMFVAR = ~/") "TEXMFVAR = $XDG_CACHE_HOME/")
+                (("^TEXMFCONFIG = ~/") "TEXMFCONFIG = $XDG_CONFIG_HOME/")
+                (("^TEXMFCACHE = .*") "TEXMFCACHE = $TEXMFVAR\n")
                 ;; "ls-R" files are to be expected only in the TEXMFDIST
-                ;; directories.
+                ;; directories.  TEXMFLOCAL is not necessary for Guix, but
+                ;; could be required anyway by external TeX installations.
                 (("^TEXMF = .*")
-                 "TEXMF = 
{$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFSYSCONFIG,$TEXMFSYSVAR,!!$TEXMFDIST}\n")
-                (("^TEXMFDBS = .*") "TEXMFDBS = {$TEXMFDIST}\n")
-                ;; Ignore system-wide cache, which is not writable.  Use local
-                ;; one instead, i.e. "$HOME/.texliveYYYY/texmf-var/".
-                (("^TEXMFCACHE = .*") "TEXMFCACHE = $TEXMFVAR\n")
+                 "TEXMF = 
{$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!TEXMFLOCAL,TEXMFSYSVAR,TEXMFSYSCONFIG,!!$TEXMFDIST}\n")
+                (("^TEXMFDBS = .*") "TEXMFDBS = 
{!!$TEXMFLOCAL,!!$TEXMFDIST}\n")
                 ;; Set TEXMFCNF.  Since earlier values of variables have
                 ;; precedence over later ones, insert the desired value first.
                 (("^TEXMFCNF =")
@@ -65870,7 +65874,7 @@ iterate, apply, etc., to the table.")
                 (("TEXMFSYSCONFIG *=.*")
                  "TEXMFSYSCONFIG = \"$TEXMFDIST/../texmf-config\",\n")
                 (("TEXMF *=.*")
-                 "TEXMF = 
\"{$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFSYSCONFIG,$TEXMFSYSVAR,$TEXMFDIST}\",\n")))))))
+                 "TEXMF = 
\"{$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFLOCAL,$TEXMFSYSCONFIG,$TEXMFSYSVAR,$TEXMFDIST}\",\n")))))))
     (native-inputs (list libfaketime texlive-kpathsea))
     (propagated-inputs
      (list texlive-cm

Reply via email to