This fixes a bug that allowed any document compiled with LuaTeX to execute
arbitrary shell commands, even with shell escape disabled.
See https://tug.org/~mseven/luatex.html for more details.
Calling 'faketime fmtutil' fails on some non-NixOS systems, due to
fmtutil calling system, and implicitly /bin/sh, which may be
incompatible with faketime's LD_PRELOAD (e.g. using a different glibc).
This change moves faketime within fmtutil so that LD_PRELOAD is applied
only to the final binary.
This is neccessary for XeTeX to find the fonts distributed with
TeXLive.
The fontconfig file generated by makeFontsConf is almost identical to the one
from the fontconfig package and /etc/fonts/fonts.conf on NixOS -- it only adds
the specified font directories. In particular this means that all the actual
configuration files in /etc/fonts/conf.d are still included and there also is a
/usr/share/fonts font directory entry for use with non-NixOS linuxes, so
it's unlikely that this breaks someone's setup.
The 'non-relocated' packages of TeX Live expect to live in
TEXMFROOT/texmf-dist (e.g. to search for perl modules). This change
builds TEXMFROOT instead of just TEXMFDIST to accommodate those
packages, and obviate the need for patching fmtutil.
prior to this change, the build fails because the documentation cannot be
generated due to a missing latex package (probably fallout from a texlive
update):
! LaTeX Error: File `hypdoc.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.29 \begin{document}
^^M
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on preview.log.
make[1]: *** [Makefile:91: preview.pdf] Error 1
make[1]: Leaving directory '/build/auctex-12.3/latex'
make: *** [Makefile:219: texmf] Error 2
The build system generates the file "hitables.c" with the program
"./himktables" that is also compiled by the build system.
This does not work when cross-compiling since this program is built for the
wrong architecture. We already use a natively built copy of texlive.bin.core for
various other tools (like tangle, weave), so this change just adds himktables to the
this native copy and uses this program in the cross build.