Merge pull request #169080 from iblech/patch-texlive-repro

texlive: improve reproducibility
This commit is contained in:
Artturi 2022-04-26 16:22:22 +03:00 committed by GitHub
commit 6e4f70e880
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -225,7 +225,7 @@ in (buildEnv {
perl `type -P mktexlsr.pl` --sort ./share/texmf
${bin.texlinks}/bin/texlinks "$out/bin" && wrapBin
perl `type -P fmtutil.pl` --sys --all | grep '^fmtutil' # too verbose
FORCE_SOURCE_DATE=1 perl `type -P fmtutil.pl` --sys --all | grep '^fmtutil' # too verbose
#${bin.texlinks}/bin/texlinks "$out/bin" && wrapBin # do we need to regenerate format links?
# Disable unavailable map files
@ -233,6 +233,9 @@ in (buildEnv {
# Regenerate the map files (this is optional)
perl `type -P updmap.pl` --sys --force
# sort entries to improve reproducibility
[[ -f "$TEXMFSYSCONFIG"/web2c/updmap.cfg ]] && sort -o "$TEXMFSYSCONFIG"/web2c/updmap.cfg "$TEXMFSYSCONFIG"/web2c/updmap.cfg
perl `type -P mktexlsr.pl` --sort ./share/texmf-* # to make sure
'' +
# install (wrappers for) scripts, based on a list from upstream texlive
@ -299,7 +302,12 @@ in (buildEnv {
)
fi
''
+ bin.cleanBrokenLinks
+ bin.cleanBrokenLinks +
# Get rid of all log files. They are not needed, but take up space
# and render the build unreproducible by their embedded timestamps.
''
find $TEXMFSYSVAR/web2c -name '*.log' -delete
''
;
}).overrideAttrs (_: { allowSubstitutes = true; })
# TODO: make TeX fonts visible by fontconfig: it should be enough to install an appropriate file