mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
Diff: https://github.com/tectonic-typesetting/tectonic/compare/tectonic@0.15.0...tectonic@0.16.8 Changelog: https://github.com/tectonic-typesetting/tectonic/blob/tectonic@0.16.8/CHANGELOG.md Other note: The hard-coded bundle URL is now written into the unwrapped derivation, and the comment of it was expanded and should explain why this was done. Due to this change, overriding tectonic to use a different default bundle will require either wrapping only `tectonic` to use a different `--bundle` command line argument, or rebuilding the unwrapped derivation with a different `env.TECTONIC_BUNDLE_LOCKED`.
55 lines
1.7 KiB
Nix
55 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
symlinkJoin,
|
|
tectonic-unwrapped,
|
|
biber-for-tectonic,
|
|
makeBinaryWrapper,
|
|
callPackage,
|
|
}:
|
|
|
|
symlinkJoin {
|
|
inherit (tectonic-unwrapped) version;
|
|
pname = "${tectonic-unwrapped.pname}-wrapped";
|
|
paths = [ tectonic-unwrapped ];
|
|
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
|
|
|
passthru = {
|
|
unwrapped = tectonic-unwrapped;
|
|
biber = biber-for-tectonic;
|
|
tests = callPackage ./tests.nix { };
|
|
};
|
|
|
|
# Replace the unwrapped tectonic with the one wrapping it with biber
|
|
postBuild = ''
|
|
rm $out/bin/{tectonic,nextonic}
|
|
''
|
|
# Pin the version of the online TeX bundle that Tectonic's developer
|
|
# distribute, so that the `biber` version and the `biblatex` version
|
|
# distributed from there are compatible.
|
|
#
|
|
# Upstream is updating it's online TeX bundle slower then
|
|
# https://github.com/plk/biber. That's why we match here the `bundleURL`
|
|
# version with that of `biber-for-tectonic`. See also upstream discussion:
|
|
#
|
|
# https://github.com/tectonic-typesetting/tectonic/discussions/1122
|
|
#
|
|
# Hence, we can be rather confident that for the near future, the online
|
|
# TeX bundle won't be updated and hence the biblatex distributed there
|
|
# won't require a higher version of biber.
|
|
+ ''
|
|
makeWrapper ${lib.getBin tectonic-unwrapped}/bin/tectonic $out/bin/tectonic \
|
|
--prefix PATH : "${lib.getBin biber-for-tectonic}/bin" \
|
|
--inherit-argv0 ## make sure binary name e.g. `nextonic` is passed along
|
|
ln -s $out/bin/tectonic $out/bin/nextonic
|
|
'';
|
|
|
|
meta = tectonic-unwrapped.meta // {
|
|
description = "TeX/LaTeX engine, wrapped with a compatible biber";
|
|
maintainers = with lib.maintainers; [
|
|
doronbehar
|
|
bryango
|
|
];
|
|
};
|
|
}
|