{ description = "Curriculum Vitae"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, flake-utils}: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; inputName = "cv"; in { packages = rec { devShell = pkgs.mkShell { buildInputs = with pkgs; [ coreutils texlive.combined.scheme-full texlab ]; }; document = pkgs.stdenvNoCC.mkDerivation { pname = "Curriculum Vitae"; version = "1.1"; src = ./src; buildInputs = with pkgs; [ coreutils texlive.combined.scheme-full ]; buildPhase = '' mkdir -p .cache/texmf-var env TEXMFHOME=.cache TEXMFVAR=.cache/texmf-var \ latexmk -interaction=nonstopmode -pdf -pdflatex \ ${inputName}.tex ''; installPhase = '' mkdir -p $out cp ${inputName}.pdf $out ''; }; default = document; }; }); }