12 name = "${tectonic-unwrapped.pname}-wrapped-${tectonic-unwrapped.version}";
13 paths = [ tectonic-unwrapped ];
15 nativeBuildInputs = [ makeBinaryWrapper ];
18 unwrapped = tectonic-unwrapped;
19 biber = biber-for-tectonic;
20 tests = callPackage ./tests.nix { };
22 # The version locked tectonic web bundle, redirected from:
23 # https://relay.fullyjustified.net/default_bundle_v33.tar
24 # To check for updates, see:
25 # https://github.com/tectonic-typesetting/tectonic/blob/master/crates/bundles/src/lib.rs
26 # ... and look up `get_fallback_bundle_url`.
27 bundleUrl = "https://data1.fullyjustified.net/tlextras-2022.0r0.tar";
30 # Replace the unwrapped tectonic with the one wrapping it with biber
33 rm $out/bin/{tectonic,nextonic}
35 # Pin the version of the online TeX bundle that Tectonic's developer
36 # distribute, so that the `biber` version and the `biblatex` version
37 # distributed from there are compatible.
39 # Upstream is updating it's online TeX bundle slower then
40 # https://github.com/plk/biber. That's why we match here the `bundleURL`
41 # version with that of `biber-for-tectonic`. See also upstream discussion:
43 # https://github.com/tectonic-typesetting/tectonic/discussions/1122
45 # Hence, we can be rather confident that for the near future, the online
46 # TeX bundle won't be updated and hence the biblatex distributed there
47 # won't require a higher version of biber.
49 makeWrapper ${lib.getBin tectonic-unwrapped}/bin/tectonic $out/bin/tectonic \
50 --prefix PATH : "${lib.getBin biber-for-tectonic}/bin" \
51 --add-flags "--web-bundle ${tectonic.passthru.bundleUrl}" \
52 --inherit-argv0 ## make sure binary name e.g. `nextonic` is passed along
53 ln -s $out/bin/tectonic $out/bin/nextonic
56 meta = tectonic-unwrapped.meta // {
57 description = "Tectonic TeX/LaTeX engine, wrapped with a compatible biber";
58 maintainers = with lib.maintainers; [