summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2026-03-20 10:23:36 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2026-04-12 23:15:28 +0200
commit2d7f403979b537e8b5585970ed3bf3710ff616de (patch)
tree2d192b1778c611954d60964c59d436b54d74dda8 /guix
parent3ec160f69b87d095fcb3e50fde7522480f2f14d9 (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.scm17
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