Skip to content

Commit aa7613a

Browse files
committed
tectonic: wrap with a correct --web-bundle
1 parent 712b827 commit aa7613a

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

pkgs/tools/typesetting/tectonic/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
{ lib
1010
, stdenv
1111
, fetchFromGitHub
12+
, fetchpatch
1213
, rustPlatform
1314
, darwin
1415
, fontconfig
1516
, harfbuzz
1617
, openssl
1718
, pkg-config
18-
, makeBinaryWrapper
1919
, icu
2020
}:
2121

pkgs/tools/typesetting/tectonic/wrapper.nix

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
{ lib
22
, symlinkJoin
3+
, tectonic
34
, tectonic-unwrapped
45
, biber-for-tectonic
56
, makeWrapper
67
, callPackage
78
}:
89

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+
921
symlinkJoin {
1022
name = "${tectonic-unwrapped.pname}-wrapped-${tectonic-unwrapped.version}";
1123
paths = [ tectonic-unwrapped ];
@@ -16,26 +28,16 @@ symlinkJoin {
1628
unwrapped = tectonic-unwrapped;
1729
biber = biber-for-tectonic;
1830
tests = callPackage ./tests.nix { };
31+
bundle.url = TECTONIC_WEB_BUNDLE_LOCKED;
1932
};
2033

2134
# Replace the unwrapped tectonic with the one wrapping it with biber
2235
postBuild = ''
2336
rm $out/bin/{tectonic,nextonic}
2437
''
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.
3941
#
4042
# Note also that upstream has announced that they will put less time and
4143
# energy for the project:
@@ -47,7 +49,8 @@ symlinkJoin {
4749
# won't require a higher version of biber.
4850
+ ''
4951
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}"
5154
ln -s $out/bin/tectonic $out/bin/nextonic
5255
'';
5356

0 commit comments

Comments
 (0)