Hi there,
I will post here since I think this is possibly an texlive upstream change interfering with the working of nixpkgs. I’m working on a LaTeX document compiled with nix much in the style of e.g. Exploring Nix Flakes: Build LaTeX Documents Reproducibly
MWE as a github repo (which is identical to the above): GitHub - mmaeusezahl/nix-texlive2024-lualatex-issue
Then I run “nix build”
- with texlive2023 it works fine
- with texlive2024 it doesn’t work (unless I add
-shell-escape
to latexmk)
TexLive2024 is in nixpkgs since commit 7cd5f8cda00425cd4ed283642f9a297a17a8f6b6
, hence I noticed after updating nixpkgs.
This seems to be related to font loading as the error comes from luaotfload:
luaotfload | load : FATAL ERROR
luaotfload | load : × Failed to load "fontloader" module "basics-gen".
luaotfload | load : × Error message:
luaotfload | load : × "...2024-texmfdist/tex/luatex/luaotfload/luaotfload-init.lua:301: system : no writeable cache path, quiting".
I did some additional tests and luaotfload seems to be happy
luaotfload | diagnose : =============== file permissions ==============
luaotfload | diagnose : Checking permissions of .cache/texmf-var/luatex-cache/generic/.
luaotfload | diagnose : Owner: 1000, group 100, permissions rwxr-xr-x.
luaotfload | diagnose : Readable: ok.
luaotfload | diagnose : Writable: ok.
luaotfload | diagnose : Checking permissions of .cache/texmf-var/luatex-cache/generic/names.
luaotfload | diagnose : Owner: 1000, group 100, permissions rwxr-xr-x.
luaotfload | diagnose : Readable: ok.
luaotfload | diagnose : Writable: ok.
luaotfload | diagnose : Checking permissions of .cache/texmf-var/luatex-cache/generic/names/luaotfload-names.lua.gz.
If anyone else has this issue: A workaround is to add -shell-escape
But this feels incorrect, as it is not necessary outside the build environment (so the document compiles fine using my system latex installation).
I suspect that something in latex kernel changed, which now requires shell-escape to create a certain file (which would be a latex upstream “bug”). But I’m not expert enough with LaTeX to pinpoint the origin.
Thanks for any suggestions!