diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index 94b8c2db9035..c2afce69771b 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -126,13 +126,23 @@ let day = "27"; }; + # The tarballs on CTAN mirrors for the current release are constantly + # receiving updates, so we can't use those directly. Stable snapshots + # need to be used instead. Ideally, for the release branches of NixOS we + # should be switching to the tlnet-final versions + # (https://tug.org/historic/). + urlPrefixes = [ + # tlnet-final snapshot + #"http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${bin.texliveYear}/tlnet-final/archive" + #"ftp://tug.org/texlive/historic/${bin.texliveYear}/tlnet-final/archive" + + # Daily snapshots hosted by one of the texlive release managers + "https://texlive.info/tlnet-archive/${snapshot.year}/${snapshot.month}/${snapshot.day}/tlnet/archive" + ]; + tlpdb = fetchurl { # use the same mirror(s) as urlPrefixes below - urls = [ - #"http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${bin.texliveYear}/tlnet-final/tlpkg/texlive.tlpdb.xz" - #"ftp://tug.org/texlive/historic/${bin.texliveYear}/tlnet-final/tlpkg/texlive.tlpdb.xz" - "https://texlive.info/tlnet-archive/${snapshot.year}/${snapshot.month}/${snapshot.day}/tlnet/tlpkg/texlive.tlpdb.xz" - ]; + urls = map (up: "${up}/../tlpkg/texlive.tlpdb.xz") urlPrefixes; hash = "sha256-i8DE3/rZmtp+gODJWeHV1VcCK5cgHUgmywf3Q/agTOA="; }; @@ -145,21 +155,7 @@ 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}.r${toString revision}.tar.xz") urlPrefixes); - - # The tarballs on CTAN mirrors for the current release are constantly - # receiving updates, so we can't use those directly. Stable snapshots - # need to be used instead. Ideally, for the release branches of NixOS we - # should be switching to the tlnet-final versions - # (https://tug.org/historic/). - urlPrefixes = args.urlPrefixes or [ - # tlnet-final snapshot - #"http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${bin.texliveYear}/tlnet-final/archive" - #"ftp://tug.org/texlive/historic/${bin.texliveYear}/tlnet-final/archive" - - # Daily snapshots hosted by one of the texlive release managers - "https://texlive.info/tlnet-archive/${snapshot.year}/${snapshot.month}/${snapshot.day}/tlnet/archive" - ]; + map (up: "${up}/${urlName}.r${toString revision}.tar.xz") (args.urlPrefixes or urlPrefixes)); in runCommand "texlive-${tlName}" ( {