diff options
| author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2026-03-20 10:23:36 +0100 |
|---|---|---|
| committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2026-04-12 23:15:28 +0200 |
| commit | 2d7f403979b537e8b5585970ed3bf3710ff616de (patch) | |
| tree | 2d192b1778c611954d60964c59d436b54d74dda8 /guix | |
| parent | 3ec160f69b87d095fcb3e50fde7522480f2f14d9 (diff) | |
guix: Generate TeX Live profiles reproductibly.
Fixes: https://issues.guix.gnu.org/73295
* guix/profiles.scm (texlive-font-maps): Do not use mktexlsr command.
Change-Id: I91710740d7f467a236cc82ceca560b0f51a4094d
Diffstat (limited to 'guix')
| -rw-r--r-- | guix/profiles.scm | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm index 1113baccc5..b39116bc0b 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1944,13 +1944,20 @@ MANIFEST." ;; but we have two: the one in /tmp containing all packages and ;; the one in #$output containing the generated font maps. To ;; avoid having to merge ls-R files, we copy the generated stuff - ;; to /tmp and run mktexlsr only once. + ;; to /tmp. + ;; + ;; The ls-R database is generated with a low level call to "ls" + ;; command because "mktexlsr" doesn’t preserve alphabetic order, + ;; probably due to symlinks. See also "texlive-local-tree" + ;; function from "tex.scm". (let ((a (string-append #$output "/share/texmf-dist")) - (b "/tmp/texlive/share/texmf-dist") - (mktexlsr #$(file-append texlive-scripts "/bin/mktexlsr"))) + (b "/tmp/texlive/share/texmf-dist")) (copy-recursively a b) - (invoke mktexlsr b) - (install-file (string-append b "/ls-R") a)))))) + (with-directory-excursion b + (with-output-to-file "ls-R" + (lambda () + (invoke "ls" "-1LAR" "./"))) + (install-file "ls-R" a))))))) (with-monad %store-monad ;; `texlive-scripts' brings essential files to generate font maps. ;; Therefore, it must be present in the profile. This check prevents |
