1
0
Fork 0
curriculum-vitae/flake.nix
2023-10-13 22:28:34 +02:00

42 lines
1.1 KiB
Nix

{ description = "Curriculum Vitae";
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixos-23.05;
flake-utils.url = github:numtide/flake-utils;
};
outputs = { self, nixpkgs, flake-utils}:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
input = "cv";
in {
packages = rec {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
coreutils
texlive.combined.scheme-full
texlab
];
};
document = pkgs.stdenvNoCC.mkDerivation rec {
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 \
${input}.tex
'';
installPhase = ''
mkdir -p $out
cp ${input}.pdf $out/
'';
};
default = document;
};
});
}