Skip to content

Commit 22e6928

Browse files
committed
texlive: allow to add custom mirrors
1 parent ae10ca7 commit 22e6928

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

pkgs/tools/typesetting/tex/texlive/default.nix

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
biber-ms,
4343
makeFontsConf,
4444
useFixedHashes ? true,
45+
extraMirrors ? [ ],
4546
recurseIntoAttrs,
4647
nixfmt,
4748
}:
@@ -115,25 +116,28 @@ let
115116
# should be switching to the tlnet-final versions
116117
# (https://tug.org/historic/).
117118
mirrors =
118-
if version.final then
119-
[
120-
# tlnet-final snapshot; used when texlive.tlpdb is frozen
121-
# the TeX Live yearly freeze typically happens in mid-March
122-
"http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${toString version.texliveYear}/tlnet-final"
123-
"ftp://tug.org/texlive/historic/${toString version.texliveYear}/tlnet-final"
124-
]
125-
else
126-
[
127-
# CTAN mirrors
128-
"https://mirror.ctan.org/systems/texlive/tlnet"
129-
# daily snapshots hosted by one of the texlive release managers;
130-
# used for packages that in the meanwhile have been updated or removed from CTAN
131-
# and for packages that have not reached yet the historic mirrors
132-
# please note that this server is not meant for large scale deployment
133-
# https://tug.org/pipermail/tex-live/2019-November/044456.html
134-
# https://texlive.info/ MUST appear last (see tlpdbxz)
135-
"https://texlive.info/tlnet-archive/${version.year}/${version.month}/${version.day}/tlnet"
136-
];
119+
extraMirrors
120+
++ (
121+
if version.final then
122+
[
123+
# tlnet-final snapshot; used when texlive.tlpdb is frozen
124+
# the TeX Live yearly freeze typically happens in mid-March
125+
"http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${toString version.texliveYear}/tlnet-final"
126+
"ftp://tug.org/texlive/historic/${toString version.texliveYear}/tlnet-final"
127+
]
128+
else
129+
[
130+
# CTAN mirrors
131+
"https://mirror.ctan.org/systems/texlive/tlnet"
132+
# daily snapshots hosted by one of the texlive release managers;
133+
# used for packages that in the meanwhile have been updated or removed from CTAN
134+
# and for packages that have not reached yet the historic mirrors
135+
# please note that this server is not meant for large scale deployment
136+
# https://tug.org/pipermail/tex-live/2019-November/044456.html
137+
# https://texlive.info/ MUST appear last (see tlpdbxz)
138+
"https://texlive.info/tlnet-archive/${version.year}/${version.month}/${version.day}/tlnet"
139+
]
140+
);
137141

138142
tlpdbxz = fetchurl {
139143
urls =

0 commit comments

Comments
 (0)