summary refs log tree commit diff
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2018-09-27 11:54:40 -0400
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2018-09-27 13:39:28 -0400
commit91c304030a509c1913d6baf5d274e2d078d10bfd (patch)
tree3e2a60dc6a44adcfaa5c2f7c982fea11b60e81d4
parentb53b8639a60a77e08e5d4452238a0523c52a96ac (diff)
downloadnixlib-91c304030a509c1913d6baf5d274e2d078d10bfd.tar
nixlib-91c304030a509c1913d6baf5d274e2d078d10bfd.tar.gz
nixlib-91c304030a509c1913d6baf5d274e2d078d10bfd.tar.bz2
nixlib-91c304030a509c1913d6baf5d274e2d078d10bfd.tar.lz
nixlib-91c304030a509c1913d6baf5d274e2d078d10bfd.tar.xz
nixlib-91c304030a509c1913d6baf5d274e2d078d10bfd.tar.zst
nixlib-91c304030a509c1913d6baf5d274e2d078d10bfd.zip
texlive: generate MkIV caches
Documentation:
http://www.pragma-ade.com/general/manuals/tools-mkiv.pdf

Fixes: #19279
Closes: #47370
-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
   ;