Skip to content

Commit

Permalink
tectonic-with-biber: init wrapper
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bryango and doronbehar committed Dec 15, 2023
1 parent a000bff commit a864d46
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
44 changes: 44 additions & 0 deletions pkgs/tools/typesetting/tectonic/wrapper.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{ lib
, makeBinaryWrapper
, symlinkJoin
, tectonic
, biber-for-tectonic
}:

let

pname = "tectonic-with-biber";
inherit (biber-for-tectonic) version;

# manually construct `name` for `symlinkJoin`
name = "${pname}-${version}";

meta = tectonic.meta // {
inherit name;
description = "Tectonic, wrapped with the correct biber version";
longDescription = ''
This package wraps tectonic with biber without triggering rebuilds.
This serves as a downstream fix for:
- https://github.com/tectonic-typesetting/tectonic/issues/893
'';
maintainers = with lib.maintainers; [ bryango ];
};

in

symlinkJoin {

inherit pname version name meta;

paths = [ tectonic ];
nativeBuildInputs = [ makeBinaryWrapper ];
passthru = { biber = biber-for-tectonic; };

# tectonic runs biber when it detects it needs to run it, see:
# https://github.com/tectonic-typesetting/tectonic/releases/tag/tectonic%400.7.0
postBuild = ''
wrapProgram $out/bin/tectonic \
--prefix PATH : "${lib.getBin biber-for-tectonic}/bin"
'';

}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25326,6 +25326,8 @@ with pkgs;
harfbuzz = harfbuzzFull;
};

tectonic-with-biber = callPackage ../tools/typesetting/tectonic/wrapper.nix { };

tepl = callPackage ../development/libraries/tepl { };

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

0 comments on commit a864d46

Please sign in to comment.