···3344{ lib
55, fetchFromGitHub
66+, writeText
67, runCommand
78, tectonic
89, curl
···2627 };
2728 testfiles = "${biber-dev-source}/testfiles";
28292929- noNetNotice = builtins.toFile "tectonic-offline-notice" ''
3030+ noNetNotice = writeText "tectonic-offline-notice" ''
3031 # To fetch tectonic's web bundle, the tests require internet access,
3132 # which is not available in the current environment.
3233 '';
···8384 # tectonic caches in the $HOME directory, so set it to $PWD
8485 export HOME=$PWD
8586 tectonic -X compile ./test.tex
8787+ '';
8888+8989+ workspace = ''
9090+ tectonic -X new
9191+ cat Tectonic.toml | grep "${tectonic.bundleUrl}"
8692 '';
8793}
+18-19
pkgs/tools/typesetting/tectonic/wrapper.nix
···11{ lib
22, symlinkJoin
33+, tectonic
34, tectonic-unwrapped
45, biber-for-tectonic
55-, makeWrapper
66+, makeBinaryWrapper
67, callPackage
78}:
89···1011 name = "${tectonic-unwrapped.pname}-wrapped-${tectonic-unwrapped.version}";
1112 paths = [ tectonic-unwrapped ];
12131313- nativeBuildInputs = [ makeWrapper ];
1414+ nativeBuildInputs = [ makeBinaryWrapper ];
14151516 passthru = {
1617 unwrapped = tectonic-unwrapped;
1718 biber = biber-for-tectonic;
1819 tests = callPackage ./tests.nix { };
2020+2121+ # The version locked tectonic web bundle, redirected from:
2222+ # https://relay.fullyjustified.net/default_bundle_v33.tar
2323+ # To check for updates, see:
2424+ # https://github.com/tectonic-typesetting/tectonic/blob/master/crates/bundles/src/lib.rs
2525+ # ... and look up `get_fallback_bundle_url`.
2626+ bundleUrl = "https://data1.fullyjustified.net/tlextras-2022.0r0.tar";
1927 };
20282129 # Replace the unwrapped tectonic with the one wrapping it with biber
2230 postBuild = ''
2331 rm $out/bin/{tectonic,nextonic}
2432 ''
2525- # Ideally, we would have liked to also pin the version of the online TeX
2626- # bundle that Tectonic's developer distribute, so that the `biber` version
2727- # and the `biblatex` version distributed from there are compatible.
2828- # However, that is not currently possible, due to lack of upstream support
2929- # for specifying this in runtime, there were 2 suggestions sent upstream
3030- # that suggested a way of improving the situation:
3333+ # Pin the version of the online TeX bundle that Tectonic's developer
3434+ # distribute, so that the `biber` version and the `biblatex` version
3535+ # distributed from there are compatible.
3136 #
3232- # - https://github.com/tectonic-typesetting/tectonic/pull/1132
3333- # - https://github.com/tectonic-typesetting/tectonic/pull/1131
3434- #
3535- # The 1st suggestion seems more promising as it'd allow us to simply use
3636- # makeWrapper's --add-flags option. However, the PR linked above is not
3737- # complete, and as of currently, upstream hasn't even reviewed it, or
3838- # commented on the idea.
3939- #
4040- # Note also that upstream has announced that they will put less time and
4141- # energy for the project:
3737+ # Upstream is updating it's online TeX bundle slower then
3838+ # https://github.com/plk/biber. That's why we match here the `bundleURL`
3939+ # version with that of `biber-for-tectonic`. See also upstream discussion:
4240 #
4341 # https://github.com/tectonic-typesetting/tectonic/discussions/1122
4442 #
···4745 # won't require a higher version of biber.
4846 + ''
4947 makeWrapper ${lib.getBin tectonic-unwrapped}/bin/tectonic $out/bin/tectonic \
5050- --prefix PATH : "${lib.getBin biber-for-tectonic}/bin"
4848+ --prefix PATH : "${lib.getBin biber-for-tectonic}/bin" \
4949+ --add-flags "--web-bundle ${tectonic.passthru.bundleUrl}"
5150 ln -s $out/bin/tectonic $out/bin/nextonic
5251 '';
5352