{ description = "Aria Shrimpton dissertation"; outputs = { self, nixpkgs, }: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; tex = pkgs.texlive.combine { inherit (pkgs.texlive) scheme-small microtype sectsty printlen psnfss helvetic courier biblatex latex-bin latexmk ; }; in rec { devShells.${system}.default = pkgs.mkShell { buildInputs = [ pkgs.just # command runner tex # latex environment pkgs.biber # bibliography backend pkgs.racket-minimal pkgs.z3 ]; }; packages.${system} = { default = pkgs.stdenvNoCC.mkDerivation rec { name = "thesis"; src = ./thesis; buildInputs = [pkgs.coreutils tex pkgs.biber]; phases = ["unpackPhase" "buildPhase" "installPhase"]; buildPhase = '' export PATH="${pkgs.lib.makeBinPath buildInputs}"; mkdir -p .cache/texmf-var env TEXMFHOME=.cache TEXMFVAR=.cache/texmf-var \ latexmk -interaction=nonstopmode -bibtex -pdf \ main.tex ''; installPhase = '' mkdir -p $out cp main.pdf $out/ ''; }; }; }; }