-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a simple `symlinkJoin` wrapper that bundles tectonic with an appropriate version of biber. This is partially is recovered from: 5aa8e9f Also, add @bryango as maintainer. Co-authored-by: Doron Behar <[email protected]>
- Loading branch information
1 parent
b878060
commit f047666
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ lib | ||
, makeBinaryWrapper | ||
, symlinkJoin | ||
, tectonic | ||
, biberVersions | ||
}: | ||
|
||
let | ||
|
||
pname = "tectonic-with-biber"; | ||
biber = biberVersions.biber-for-tectonic; | ||
inherit (biber) version; | ||
|
||
## manually construct `name` for `symlinkJoin` | ||
name = "${pname}-${version}"; | ||
|
||
meta = tectonic.meta // { | ||
inherit name; | ||
description = "Modernized TeX/LaTeX engine, with biber for bibliography"; | ||
longDescription = '' | ||
This package wraps tectonic with biber without triggering rebuilds. | ||
The biber executable is exposed with a version suffix, such as | ||
`biber-${version}`, to prevent conflict with the `biber` bundled with | ||
texlive in nixpkgs. Example use: | ||
let | ||
pkgs = <...>; # import nixpkgs here | ||
in pkgs.tectonic-with-biber.override { | ||
biber = pkgs.biberVersions.biber_2_17; | ||
} | ||
This serves as a fix for: | ||
- https://github.com/tectonic-typesetting/tectonic/issues/893 | ||
''; | ||
maintainers = with lib.maintainers; [ bryango ]; | ||
}; | ||
|
||
## produce the correct `meta.position` for `symlinkJoin` | ||
pos = builtins.unsafeGetAttrPos "description" meta; | ||
|
||
in | ||
|
||
symlinkJoin { | ||
|
||
inherit pname version name meta pos; | ||
|
||
paths = [ tectonic ]; | ||
nativeBuildInputs = [ makeBinaryWrapper ]; | ||
passthru = { biber = biber; }; | ||
|
||
## 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}/bin" | ||
makeBinaryWrapper "${lib.getBin biber}/bin/biber" \ | ||
$out/bin/biber-${biber.version} | ||
''; | ||
## the biber executable is exposed as `biber-${biber.version}` | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters