I’m trying to override a cairo in texlive.bin. I don’t want to override it in all of nixpkgs, as that would lead to me having to recompile almost every single package on my system and my machine is not fast enough, and quite a few of the builds don’t even succeed (yes overriding cairo leads to recompiling systemd, linux and a whole bunch of other packages…).
bin is an output of the texlive package, so the thing you need to override is texlive directly, i.e. (pkgs.texlive.override { cairo = ...; }). Also is there a reason you need an overlay and not just an override directly? If you’re just putting it in a package list, you shouldn’t even need to specify .bin directly, it should be the default output used.
From what I understand texlive.bin is not an output of texlive, but just a property on the set. Cairo is also not an input of texlive
I get this error with (pkgs.texlive.override { cairo = ...; }):
error: function 'anonymous lambda' called with unexpected argument 'cairo'
at /nix/store/k9bmrcqs2h3crv310zr01vahy55v4cpv-nixos-24.11/nixos/pkgs/tools/typesetting/tex/texlive/default.nix:5:1: