Skip to content

Commit b9165ab

Browse files
bryangodoronbehar
andcommitted
tectonic-with-biber: init wrapper
This is a simple `symlinkJoin` wrapper that bundles tectonic with `biber-for-tectonic`. This is partially is recovered from: 5aa8e9f Also, set @bryango as maintainer. Co-authored-by: Doron Behar <[email protected]>
1 parent ef479fa commit b9165ab

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{ lib
2+
, makeBinaryWrapper
3+
, symlinkJoin
4+
, tectonic
5+
, biber-for-tectonic
6+
, biber
7+
}:
8+
9+
let
10+
11+
pname = "tectonic-with-biber";
12+
inherit (biber-for-tectonic) version;
13+
14+
# manually construct `name` for `symlinkJoin`
15+
name = "${pname}-${version}";
16+
17+
meta = tectonic.meta // {
18+
inherit name;
19+
description = "Tectonic, wrapped with the correct biber version";
20+
longDescription = ''
21+
This package wraps tectonic with biber without triggering rebuilds.
22+
The biber executable is exposed with a version suffix, such as
23+
`biber-${version}`, to prevent conflict with the `biber` bundled with
24+
texlive in nixpkgs.
25+
26+
This serves as a downstream fix for:
27+
- https://github.com/tectonic-typesetting/tectonic/issues/893
28+
'';
29+
maintainers = with lib.maintainers; [ bryango ];
30+
};
31+
32+
in
33+
34+
symlinkJoin {
35+
36+
inherit pname version name meta;
37+
38+
paths = [ tectonic ];
39+
nativeBuildInputs = [ makeBinaryWrapper ];
40+
passthru = { inherit biber; };
41+
42+
# tectonic runs biber when it detects it needs to run it, see:
43+
# https://github.com/tectonic-typesetting/tectonic/releases/tag/tectonic%400.7.0
44+
postBuild = ''
45+
wrapProgram $out/bin/tectonic \
46+
--prefix PATH : "${lib.getBin biber-for-tectonic}/bin"
47+
makeBinaryWrapper "${lib.getBin biber-for-tectonic}/bin/biber" \
48+
$out/bin/biber-${biber-for-tectonic.version}
49+
'';
50+
# the biber executable is exposed as `biber-${biber.version}`
51+
52+
}

pkgs/top-level/all-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25336,6 +25336,8 @@ with pkgs;
2533625336
harfbuzz = harfbuzzFull;
2533725337
};
2533825338

25339+
tectonic-with-biber = callPackage ../tools/typesetting/tectonic/wrapper.nix { };
25340+
2533925341
tepl = callPackage ../development/libraries/tepl { };
2534025342

2534125343
termbench-pro = callPackage ../development/libraries/termbench-pro { fmt = fmt_8; };

0 commit comments

Comments
 (0)