Skip to content

Commit ef479fa

Browse files
bryangocollaresdoronbehar
committed
biber-for-tectonic: init at 2.17
Introduce `biber-for-tectonic`. The `tectonic` package depends on a version of `biber` that is generally different from the one in the nixpkgs `texlive` bundle. This package provides an override of biber suitable for use with tectonic. For biber<=2.17 on perl>=5.36.0 a patch is necessary. This is recovered from a previous nixpkgs commit: c784cdb Also, set @bryango as maintainer. Co-authored-by: Mauricio Collares <[email protected]> Co-authored-by: Doron Behar <[email protected]>
1 parent 2e5ea18 commit ef479fa

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
This package provides an alternative version of `biber`
3+
as an optional runtime dependency of `tectonic`.
4+
5+
The development of tectonic has slowed down recently, such that its `biber`
6+
dependency has been lagging behind the one in the nixpkgs `texlive` bundle.
7+
See:
8+
9+
https://github.com/tectonic-typesetting/tectonic/discussions/1122
10+
11+
It is now feasible to track this dependency in nixpkgs, as the biber version
12+
bump is not so frequent, and it would provide a more complete user experience
13+
of tectonic in nixpkgs.
14+
*/
15+
16+
{ lib, fetchFromGitHub, fetchpatch, biber }:
17+
18+
let version = "2.17"; in (
19+
biber.override {
20+
/*
21+
It is necessary to first override the `version` data here, which is
22+
passed to `buildPerlModule`, and then to `mkDerivation`.
23+
24+
If we simply do `biber.overrideAttrs` the resulting package `name`
25+
would be incorrect, since it has already been preprocessed by
26+
`buildPerlModule`.
27+
*/
28+
texlive.pkgs.biber.texsource = {
29+
inherit version;
30+
inherit (biber) pname meta;
31+
};
32+
}
33+
).overrideAttrs (prevAttrs: {
34+
src = fetchFromGitHub {
35+
owner = "plk";
36+
repo = "biber";
37+
rev = "v${version}";
38+
hash = "sha256-Tt2sN2b2NGxcWyZDj5uXNGC8phJwFRiyH72n3yhFCi0=";
39+
};
40+
patches = [
41+
# Perl 5.38 compatibility
42+
(fetchpatch {
43+
url = "https://patch-diff.githubusercontent.com/raw/plk/biber/pull/411.patch";
44+
hash = "sha256-osgldRVfe3jnMSOMnAMQSB0Ymc1s7J6KtM2ig3c93SE=";
45+
})
46+
];
47+
meta = prevAttrs.meta // {
48+
maintainers = with lib.maintainers; [ bryango ];
49+
};
50+
})

pkgs/top-level/all-packages.nix

+2
Original file line numberDiff line numberDiff line change
@@ -6684,6 +6684,8 @@ with pkgs;
66846684

66856685
biber = callPackage ../tools/typesetting/biber { };
66866686

6687+
biber-for-tectonic = callPackage ../tools/typesetting/tectonic/biber.nix { };
6688+
66876689
biber-ms = callPackage ../tools/typesetting/biber-ms { };
66886690

66896691
biblatex-check = callPackage ../tools/typesetting/biblatex-check { };

0 commit comments

Comments
 (0)