···235235 ln -sf fmtutil "$out/bin/mktexfmt"
236236237237 texlinks "$out/bin" && wrapBin
238238- FORCE_SOURCE_DATE=1 fmtutil --sys --all | grep '^fmtutil' # too verbose
239239- #texlinks "$out/bin" && wrapBin # do we need to regenerate format links?
240238241241- # tex intentionally ignores SOURCE_DATE_EPOCH even when FORCE_SOURCE_DATE=1
242242- # https://salsa.debian.org/live-team/live-build/-/blob/master/examples/hooks/reproducible/0139-reproducible-texlive-binaries-fmt-files.hook.chroot#L52
243243- if [[ -f "$TEXMFSYSVAR"/web2c/tex/tex.fmt ]]
244244- then
245245- faketime $(date --utc -d@$SOURCE_DATE_EPOCH --iso-8601=seconds) tex -output-directory "$TEXMFSYSVAR"/web2c/tex -ini -jobname=tex -progname=tex tex.ini
246246- fi
247247- if [[ -f "$TEXMFSYSVAR"/web2c/luahbtex/lualatex.fmt ]]
248248- then
249249- faketime $(date --utc -d@$SOURCE_DATE_EPOCH --iso-8601=seconds) luahbtex --output-directory="$TEXMFSYSVAR"/web2c/luahbtex -ini -jobname=lualatex -progname=lualatex lualatex.ini
250250- fi
239239+ # many formats still ignore SOURCE_DATE_EPOCH even when FORCE_SOURCE_DATE=1
240240+ # libfaketime fixes non-determinism related to timestamps ignoring FORCE_SOURCE_DATE
241241+ # we cannot fix further randomness caused by luatex; for further details, see
242242+ # https://salsa.debian.org/live-team/live-build/-/blob/master/examples/hooks/reproducible/2006-reproducible-texlive-binaries-fmt-files.hook.chroot#L52
243243+ FORCE_SOURCE_DATE=1 TZ= faketime -f '@1980-01-01 00:00:00 x0.001' fmtutil --sys --all | grep '^fmtutil' # too verbose
244244+ #texlinks "$out/bin" && wrapBin # do we need to regenerate format links?
251245252246 # Disable unavailable map files
253247 echo y | updmap --sys --syncwithtrees --force
···298292299293 # MkIV uses its own lookup mechanism and we need to initialize
300294 # caches for it.
295295+ # We use faketime to fix the embedded timestamps and patch the uuids
296296+ # with some random but constant values.
301297 ''
302298 if [[ -e "$out/bin/mtxrun" ]]; then
303303- mtxrun --generate
299299+ substitute "$TEXMFDIST"/scripts/context/lua/mtxrun.lua mtxrun.lua \
300300+ --replace 'cache_uuid=osuuid()' 'cache_uuid="e2402e51-133d-4c73-a278-006ea4ed734f"' \
301301+ --replace 'uuid=osuuid(),' 'uuid="242be807-d17e-4792-8e39-aa93326fc871",'
302302+ FORCE_SOURCE_DATE=1 TZ= faketime -f '@1980-01-01 00:00:00 x0.001' luatex --luaonly mtxrun.lua --generate
304303 fi
305304 ''
306305 + bin.cleanBrokenLinks +
307306 # Get rid of all log files. They are not needed, but take up space
308308- # and render the build unreproducible by their embedded timestamps.
307307+ # and render the build unreproducible by their embedded timestamps
308308+ # and other non-deterministic diagnostics.
309309 ''
310310 find "$TEXMFSYSVAR"/web2c -name '*.log' -delete
311311 ''
···216216 # As the name says, this is broken, but I don't want to lose it since it's a direction we want to go in
217217 # libdispatch-broken = callPackage ../os-specific/darwin/swift-corelibs/libdispatch.nix { };
218218219219- darling = callPackage ../os-specific/darwin/darling/default.nix { };
220220-221219 libtapi = callPackage ../os-specific/darwin/libtapi {};
222220223221 ios-deploy = callPackage ../os-specific/darwin/ios-deploy {};