{ description = "BGU MSc Thesis — ROLL Method"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; outputs = { self, nixpkgs }: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; texPkgs = with pkgs.texlive; { inherit (pkgs.texlive) scheme-small latexmk # Hebrew + encoding babel-hebrew hebrew-fonts ucs # Page layout fancyhdr setspace titling appendix # Figures caption float pgf # Math mathtools amsmath amscls was # Text enumitem footmisc csquotes # Theorems + algorithms ntheorem chngcntr algorithm2e # Bibliography natbib tocbibind # Cross-references cleveref # Misc silence ; }; in { devShells.${system}.default = pkgs.mkShell { buildInputs = [ (pkgs.texlive.combine texPkgs) ]; }; packages.${system}.default = pkgs.stdenvNoCC.mkDerivation rec { name = "roll-thesis"; src = self; buildInputs = [ pkgs.coreutils (pkgs.texlive.combine texPkgs) ]; phases = [ "unpackPhase" "buildPhase" "installPhase" ]; buildPhase = '' export PATH="${pkgs.lib.makeBinPath buildInputs}"; mkdir -p .cache/texmf-var env TEXMFHOME=.cache TEXMFVAR=.cache/texmf-var \ latexmk -pdf --interaction=nonstopmode \ main.tex ''; installPhase = '' mkdir -p $out cp main.pdf $out/ ''; }; }; }