about summary refs log tree commit diff
path: root/pkgs/tools/typesetting
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2020-03-12 17:59:23 -0400
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2020-03-15 14:56:18 -0400
commit9f44a61f3915b70af023af3e7578c9a961a1e65f (patch)
treebd38324d5d7d7578b299e29ea666f30387689fc3 /pkgs/tools/typesetting
parent9c4212cb9f9e5b5129e1c181b16993862b21a91b (diff)
downloadnixlib-9f44a61f3915b70af023af3e7578c9a961a1e65f.tar
nixlib-9f44a61f3915b70af023af3e7578c9a961a1e65f.tar.gz
nixlib-9f44a61f3915b70af023af3e7578c9a961a1e65f.tar.bz2
nixlib-9f44a61f3915b70af023af3e7578c9a961a1e65f.tar.lz
nixlib-9f44a61f3915b70af023af3e7578c9a961a1e65f.tar.xz
nixlib-9f44a61f3915b70af023af3e7578c9a961a1e65f.tar.zst
nixlib-9f44a61f3915b70af023af3e7578c9a961a1e65f.zip
texlive: use versioned tarballs
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
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r--pkgs/tools/typesetting/tex/texlive/default.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix
index 7b208e05593a..278e33c383a4 100644
--- a/pkgs/tools/typesetting/tex/texlive/default.nix
+++ b/pkgs/tools/typesetting/tex/texlive/default.nix
@@ -89,7 +89,7 @@ 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}";
@@ -97,8 +97,12 @@ let
       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