diff options
author | Vincenzo Mantova <xworld21@users.sf.net> | 2021-06-21 20:03:12 +0100 |
---|---|---|
committer | Vincenzo Mantova <xworld21@users.sf.net> | 2021-06-21 20:03:12 +0100 |
commit | 6d56f95424734f277655570bc0a98a2bdb89cf7b (patch) | |
tree | dddaaa1f869402dca41ef3e293b2a2a20546ae02 /pkgs/tools/typesetting | |
parent | c06cb69ca0dc02b37e27104ac8415c3cab173328 (diff) |
texlive.texdoc: build Data.tlpdb.lua
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r-- | pkgs/tools/typesetting/tex/texlive/default.nix | 42 | ||||
-rw-r--r-- | pkgs/tools/typesetting/tex/texlive/fixedHashes.nix | 2 |
2 files changed, 43 insertions, 1 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index f7bd02d8af537..c21a5dda994ab 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -7,6 +7,7 @@ , makeWrapper, python3, ruby, perl , useFixedHashes ? true , recurseIntoAttrs +, fetchpatch }: let # various binaries (compiled) @@ -56,6 +57,37 @@ let collection-plaingeneric = orig.collection-plaingeneric // { deps = orig.collection-plaingeneric.deps // { inherit (tl) xdvi; }; }; + + texdoc = orig.texdoc // { + # build Data.tlpdb.lua (part of the 'tlType == "run"' package) + postUnpack = let + # commit that ensures reproducibility of Data.tlpdb.lua + # remove on the next texdoc update + reproPatch = fetchpatch { + name = "make-data-tlpdb-lua-reproducible.patch"; + url = "https://github.com/TeX-Live/texdoc/commit/82aff83d5453a887c1117b9e771a98bddd8a605a.patch"; + sha256 = "0y04y468i7db4p5bsyyhgzip8q4fi1756x9a15ndha9xfnasbf44"; + stripLen = 2; + extraPrefix = "scripts/texdoc/"; + }; + in '' + if [[ -f "$out"/scripts/texdoc/texdoc.tlu ]]; then + patch -p1 -d "$out" < "${reproPatch}" + + unxz --stdout "${tlpdb}" > texlive.tlpdb + + # create dummy doc file to ensure that texdoc does not return an error + mkdir -p support/texdoc + touch support/texdoc/NEWS + + TEXMFCNF="${bin.core}"/share/texmf-dist/web2c TEXMF="$out" TEXDOCS=. TEXMFVAR=. \ + "${bin.luatex}"/bin/texlua "$out"/scripts/texdoc/texdoc.tlu \ + -c texlive_tlpdb=texlive.tlpdb -lM texdoc + + cp texdoc/cache-tlpdb.lua "$out"/scripts/texdoc/Data.tlpdb.lua + fi + ''; + }; }); # overrides # tl = @@ -93,6 +125,16 @@ let day = "08"; }; + tlpdb = fetchurl { + # use the same mirror(s) as urlPrefixes below + urls = [ + #"http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2019/tlnet-final/tlpkg/texlive.tlpdb.xz" + #"ftp://tug.org/texlive/historic/2019/tlnet-final/tlpkg/texlive.tlpdb.xz" + "https://texlive.info/tlnet-archive/${snapshot.year}/${snapshot.month}/${snapshot.day}/tlnet/tlpkg/texlive.tlpdb.xz" + ]; + sha512 = "1dsj4bza84g2f2z0w31yil3iwcnggcyg9f1xxwmp6ljk5xlzyr39cb556prx9691zbwpbrwbb5hnbqxqlnwsivgk0pmbl9mbjbk9cz0"; + }; + # create a derivation that contains an unpacked upstream TL package mkPkg = { pname, tlType, revision, version, sha512, postUnpack ? "", stripPrefix ? 1, ... }@args: let diff --git a/pkgs/tools/typesetting/tex/texlive/fixedHashes.nix b/pkgs/tools/typesetting/tex/texlive/fixedHashes.nix index 999f5cc93fc87..d7182086f9aee 100644 --- a/pkgs/tools/typesetting/tex/texlive/fixedHashes.nix +++ b/pkgs/tools/typesetting/tex/texlive/fixedHashes.nix @@ -729,7 +729,7 @@ "texdiff.doc-0.4"="r9wsmivjyiwdnav7qc35kydk9b8pbcz8"; "texdirflatten-1.3"="135358h2mb608wg3ni93rrsvvqgxm4ya"; "texdirflatten.doc-1.3"="n9jxdwjiylvwy6n55vgci9a32qi10xhl"; -"texdoc-3.3"="3sjc6kp2l1p97qnhqqby5qcahcfj8irf"; +"texdoc-3.3"="zybis3ds27vzr62qsvkmph787jb12msz"; "texdoc.doc-3.3"="ri2jcsh0ja8wmjs9y9692m0zc0z8gxvi"; "texdoctk-0.6.0"="p6c2lakbnbg1wdc7i4iavscn9k0xamw5"; "texdoctk.doc-0.6.0"="xfl4g9m6d9nbn4f9hgxj58jg9g4laa7l"; |