Skip to content

Commit

Permalink
texlive: use versioned tarballs
Browse files Browse the repository at this point in the history
Announced in [1], versioned tarballs allow to make sure that a
specific version is fetched. This does not guarantee that all previous
versions are retained on the main mirrors.

Logically, we would want to first try to download versioned tarballs
from any mirror and only then try the unversioned ones. But right now
we only have two mirrors and only some of the tarballs are versioned
in texlive-2019, so the order is changed to not hammer the weak
tug.org mirror.

[1] https://tug.org/pipermail/tex-live/2019-September/044086.html
  • Loading branch information
veprbl committed Mar 15, 2020
1 parent 9c4212c commit 9f44a61
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkgs/tools/typesetting/tex/texlive/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,20 @@ let
};

# create a derivation that contains an unpacked upstream TL package
mkPkg = { pname, tlType, version, sha512, postUnpack ? "", stripPrefix ? 1, ... }@args:
mkPkg = { pname, tlType, revision, version, sha512, postUnpack ? "", stripPrefix ? 1, ... }@args:
let
# the basename used by upstream (without ".tar.xz" suffix)
urlName = pname + lib.optionalString (tlType != "run") ".${tlType}";
tlName = urlName + "-${version}";
fixedHash = fixedHashes.${tlName} or null; # be graceful about missing hashes

urls = args.urls or (if args ? url then [ args.url ] else
map (up: "${up}/${urlName}.tar.xz") urlPrefixes
);
lib.concatMap
(up: [
"${up}/${urlName}.r${toString revision}.tar.xz"
"${up}/${urlName}.tar.xz" # TODO To be removed for telive 2020
])
urlPrefixes);

# The tarballs on CTAN mirrors for the current release are constantly
# receiving updates, so we can't use those directly. Stable snapshots
Expand Down

0 comments on commit 9f44a61

Please sign in to comment.