edit TexLive HOWTOedit TexLive componentsThere is a "core" texlive component and some additional components:
nicpkgs_sys.texLive is the "core" component, other components add fonts/styles and extra functionalities. edit The problem
export TEXINPUTS="./:/nix/store/d6xw1wangjq75dw7grh5d9318687hfhi-texlive-extra-2009/texmf-dist//:" would just solve the issue without much hassle. However, each time you upgrade/add an optional texlive component, you should update the TEXINPUTS environment variable, and this is bad. edit The SolutionInstead of explicitly install texLive components via /etc/nixos/configuration.nix (environment.systemPackages) or nix-env -i, one should write a nix-expression using the following function: texLiveAggregationFun cfr. http://www.mail-archive.com/nix-dev@cs.uu.nl/msg00996.html and http://www.mail-archive.com/nix-dev@cs.uu.nl/msg00998.html
edit /etc/nixos/configuration.nix and add (or edit, if environment.systemPackages is already set): environment = {
systemPackages = [
...
(let myTexLive =
pkgs.texLiveAggregationFun {
paths = [ pkgs.texLive pkgs.texLiveExtra pkgs.texLiveBeamer ];
};
in myTexLive)
...
];
...
};
the "let myTexLive =" will introduce a new nix-expression using texLiveAggregationFun { paths = [ all_your_texLive_components_here ]; }. the (let myTexLive = ... in myTexLive) will actually evaluate the function upon a nixos-rebuild switch command. After a nixos-rebuild switch, all the specified texLive components will be built and their texmf-dist// scanned, resulting in an environment with a full working texlive + optional components setup.
create a file ~/.nix-defexpr/texlive.nix: let
nixpkgs = (import ./nixpkgs_sys) {};
in
with nixpkgs; {
myTexLive = texLiveAggregationFun {
paths = [
texLive texLiveExtra texLiveBeamer
];
} // { name = "mytexlive"; };
}
and install with nix-env -i -A texlive |