1
0
Fork 0
curriculum-vitae/flake.nix
2024-01-13 19:52:18 +01:00

42 lines
1.1 KiB
Nix

{ 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;
};
});
}