1
1
{ lib
2
2
, symlinkJoin
3
+ , tectonic
3
4
, tectonic-unwrapped
4
5
, biber-for-tectonic
5
6
, makeWrapper
6
7
, callPackage
7
8
} :
8
9
10
+ let
11
+
12
+ # The version locked tectonic web bundle, redirected from:
13
+ # https://relay.fullyjustified.net/default_bundle_v33.tar
14
+ # To check for updates, see:
15
+ # https://github.com/tectonic-typesetting/tectonic/blob/master/crates/bundles/src/lib.rs
16
+ # ... and look up `get_fallback_bundle_url`.
17
+ TECTONIC_WEB_BUNDLE_LOCKED = "https://data1.fullyjustified.net/tlextras-2022.0r0.tar" ;
18
+
19
+ in
20
+
9
21
symlinkJoin {
10
22
name = "${ tectonic-unwrapped . pname } -wrapped-${ tectonic-unwrapped . version } " ;
11
23
paths = [ tectonic-unwrapped ] ;
@@ -16,26 +28,16 @@ symlinkJoin {
16
28
unwrapped = tectonic-unwrapped ;
17
29
biber = biber-for-tectonic ;
18
30
tests = callPackage ./tests.nix { } ;
31
+ bundle . url = TECTONIC_WEB_BUNDLE_LOCKED ;
19
32
} ;
20
33
21
34
# Replace the unwrapped tectonic with the one wrapping it with biber
22
35
postBuild = ''
23
36
rm $out/bin/{tectonic,nextonic}
24
37
''
25
- # Ideally, we would have liked to also pin the version of the online TeX
26
- # bundle that Tectonic's developer distribute, so that the `biber` version
27
- # and the `biblatex` version distributed from there are compatible.
28
- # However, that is not currently possible, due to lack of upstream support
29
- # for specifying this in runtime, there were 2 suggestions sent upstream
30
- # that suggested a way of improving the situation:
31
- #
32
- # - https://github.com/tectonic-typesetting/tectonic/pull/1132
33
- # - https://github.com/tectonic-typesetting/tectonic/pull/1131
34
- #
35
- # The 1st suggestion seems more promising as it'd allow us to simply use
36
- # makeWrapper's --add-flags option. However, the PR linked above is not
37
- # complete, and as of currently, upstream hasn't even reviewed it, or
38
- # commented on the idea.
38
+ # Pin the version of the online TeX bundle that Tectonic's developer
39
+ # distribute, so that the `biber` version and the `biblatex` version
40
+ # distributed from there are compatible.
39
41
#
40
42
# Note also that upstream has announced that they will put less time and
41
43
# energy for the project:
@@ -47,7 +49,8 @@ symlinkJoin {
47
49
# won't require a higher version of biber.
48
50
+ ''
49
51
makeWrapper ${ lib . getBin tectonic-unwrapped } /bin/tectonic $out/bin/tectonic \
50
- --prefix PATH : "${ lib . getBin biber-for-tectonic } /bin"
52
+ --prefix PATH : "${ lib . getBin biber-for-tectonic } /bin" \
53
+ --add-flags "--web-bundle ${ tectonic . passthru . bundle . url } "
51
54
ln -s $out/bin/tectonic $out/bin/nextonic
52
55
'' ;
53
56
0 commit comments