Skip to content

Commit

Permalink
Merge pull request #169080 from iblech/patch-texlive-repro
Browse files Browse the repository at this point in the history
texlive: improve reproducibility
  • Loading branch information
Artturin committed Apr 26, 2022
2 parents 325fb71 + 804ee6e commit 6e4f70e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkgs/tools/typesetting/tex/texlive/combine.nix
Expand Up @@ -225,14 +225,17 @@ 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
echo y | perl `type -P updmap.pl` --sys --syncwithtrees --force
# 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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6e4f70e

Please sign in to comment.