guix_mirror_bot pushed a commit to branch tex-team
in repository guix.
commit b07f45d97f5442a48236a06c24a1e1cef8dede8a
Author: Nicolas Goaziou <[email protected]>
AuthorDate: Fri Mar 20 10:23:36 2026 +0100
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
---
guix/profiles.scm | 17 ++++++++++++-----
1 file 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