summary refs log tree commit diff
path: root/pkgs/tools/typesetting/tex/texlive/combine.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/typesetting/tex/texlive/combine.nix')
-rw-r--r--pkgs/tools/typesetting/tex/texlive/combine.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive/combine.nix b/pkgs/tools/typesetting/tex/texlive/combine.nix
index 8a01ac744145..f76b71ced3cf 100644
--- a/pkgs/tools/typesetting/tex/texlive/combine.nix
+++ b/pkgs/tools/typesetting/tex/texlive/combine.nix
@@ -235,6 +235,19 @@ in buildEnv {
         ln -s -t . ../texmf/doc/"$d"/*
       )
     done
+  '' +
+  # MkIV uses its own lookup mechanism and we need to initialize
+  # caches for it. Unsetting TEXMFCNF is needed to let mtxrun
+  # determine it from kpathsea so that the config path is given with
+  # "selfautodir:" as it will be in runtime. This is important because
+  # the cache is identified by a hash of this path.
+  ''
+    if [[ -e "$out/bin/mtxrun" ]]; then
+      (
+        unset TEXMFCNF
+        mtxrun --generate
+      )
+    fi
   ''
     + bin.cleanBrokenLinks
   ;