Closed ghost closed 9 months ago
The version of biber that we ship corresponds to texlive.biblatex
. tectonic
ships with texlive 2018 (tectonic-typesetting/tectonic-staging#9). And doesn't yet have a builtin solution for biber tectonic-typesetting/tectonic#35. You can try overriding biber to version 2.11, which should be compatible.
cc @lluchs as maintainer of tectonic
I would also appreciate a fix for this. I tried overriding biber
to version 2.11, but that didn't help (similar version incompatibility), at least not on the current unstable channel or on 20.03 to match with the date of @veprbl's message. The biblatex
version in the current texlive
derivation seems to be 3.3, which dates back to 2016, so it looks like updating biblatex
would make more sense.
I marked this as stale due to inactivity. → More info
I've just encountered this issue too.
@nerosnm Which version of nixpkgs are you using? What is the output of:
biber --version
realpath `which latex`
Currently biber expects biber=2.17
while nixpkgs (as well as texlive) contains biber=2.19
. For me the override suggested in https://github.com/NixOS/nixpkgs/issues/88067#issuecomment-630358815 works with no issue; e.g. with home-manager:
## home.nix
{ pkgs, ... }:
let
## source of biber v2.17
## ... from: https://hydra.nixos.org/build/202359527
nixpkgs_biber217 = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/40f79f003b6377bd2f4ed4027dde1f8f922995dd.tar.gz";
sha256 = "1javsbaxf04fjygyp5b9c9hb9dkh5gb4m4h9gf9gvqlanlnms4n5";
}) {};
in {
home.packages = with pkgs; [
tectonic ## to be overridden below
];
## equivalent to ~/.config/nixpkgs/config.nix
nixpkgs.config = {
packageOverrides = pkgs: with pkgs; {
tectonic = tectonic.override {
## overriding depedent biber to v2.17
biber = nixpkgs_biber217.biber;
};
};
};
}
Although this works on my end, I hope this could be upstreamed to nixpkgs itself so that we can make use of the hydra cache with no need to locally rebuild tectonic; cc maintainers: @lluchs @doronbehar. Thank you very much!
Tectonic is tracking this issue in https://github.com/tectonic-typesetting/tectonic/issues/893 . In general, we sort of rely on Tectonic's bundles to follow texlive releases. That's why we don't embed such hardcoding of the biber
version in Tectonic - since Tectonic could update it's bundle without an update to Tectonic itself, which could fix such an issue if it arises after a Tectonic release.
Perhaps also the following Tectonic nixpkgs update will help: https://github.com/NixOS/nixpkgs/pull/237900
Indeed... Is it then possible to create some tectonic-standalone
package without the biber
dependency, so that we can install the appropriate versions of biber
and tectonic-standalone
separately, without the need to recompile the package? :thinking: Thanks!
Indeed... Is it then possible to create some
tectonic-standalone
package without thebiber
dependency, so that we can install the appropriate versions ofbiber
andtectonic-standalone
separately, without the need to recompile the package? thinking Thanks!
You have a point. I was the one who introduced the wrapping of tectonic
with biber
in https://github.com/NixOS/nixpkgs/pull/128071 ... I tend to think now that it shouldn't be that way, especially with this frequent issue of incompatibility. I pushed that as well to #237900 .
Wow nice! Thank you very much!
I have hence created a wrapper tectonic-with-biber
so that one can combine the two into a single package, where the tectonic
-specific biber is renamed biber-${version}
to prevent conflict with the texlive biber:
## see: https://github.com/bryango/nixpkgs-config/blob/master/pkgs/tectonic-with-biber.nix
{ lib
, symlinkJoin
, makeBinaryWrapper
, tectonic
, biber
}:
symlinkJoin {
name = "tectonic-with-biber-${biber.version}";
## biber is **not** directly exposed in paths
paths = [ tectonic ];
nativeBuildInputs = [ makeBinaryWrapper ];
# 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}`
inherit (tectonic) meta;
}
I am far from proficient in nix, so the package is created following https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/graphics/gimp/wrapper.nix along with the previous revision of tectonic
. It can be used e.g. as an override:
{
tectonic-with-biber = pkgs.callPackage ./pkgs/tectonic-with-biber.nix {
## `pkgs_biber` defined as in https://github.com/NixOS/nixpkgs/issues/88067#issuecomment-1592592840
biber = pkgs_biber217.biber;
};
}
## see e.g. https://github.com/bryango/nixpkgs-config/blob/master/flake.nix
I don't know whether it's good to upstream this or not. In any case, I think it may be useful to others like me, so it would be good to share this here haha.
Update: I am now trying to upstream a more polished solution via #273740. @doronbehar would you be interested in a review? :pleading_face: The PR will close this issue.
Describe the bug
Reproduction
shell.nix
paper.tex
sample.bib
Expected behavior No errors
Notify maintainers @vcunat
Metadata
Maintainer information: