# texnix _texnix is based on [tex2nix](https://github.com/Mic92/tex2nix)._ Generate Texlive environment containing all dependencies for your document rather than downloading gigabytes of texlive packages. ## Usage ```console $ echo '\usepackage{babel}' | texnix - # Generated with texnix 1.0.0 { texlive, extraTexPackages ? {} }: texlive.combine ({ inherit (texlive) scheme-small; "babel" = texlive."babel"; "ctablestack" = texlive."ctablestack"; "luatexbase" = texlive."luatexbase"; } // extraTexPackages) ``` texnix does not follow `\input` or `\include`. However you can specify multiple texfiles as input ```console $ texnix *.tex > tex-env.nix ``` The resulting expression can be imported like this to in your document directory: ```nix # shell.nix with import {}; mkShell { buildInputs = [ (callPackage ./tex-env.nix {}) ]; } ``` ``` console $ nix-shell shell.nix nix-shell> pdflatex --version pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020/NixOS.org) ... ```