1
0
Fork 0
curriculum-vitae/flake.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

2023-10-13 22:28:34 +02:00
{ description = "Curriculum Vitae";
inputs = {
2024-01-13 19:52:18 +01:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
2023-10-13 22:28:34 +02:00
};
outputs = { self, nixpkgs, flake-utils}:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
2024-01-13 19:52:18 +01:00
inputName = "cv";
2023-10-13 22:28:34 +02:00
in {
packages = rec {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
coreutils
texlive.combined.scheme-full
texlab
];
};
2024-01-13 19:52:18 +01:00
document = pkgs.stdenvNoCC.mkDerivation {
2023-10-13 22:28:34 +02:00
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 \
2024-01-13 19:52:18 +01:00
${inputName}.tex
2023-10-13 22:28:34 +02:00
'';
installPhase = ''
2023-10-13 23:19:19 +02:00
mkdir -p $out
2024-01-13 19:52:18 +01:00
cp ${inputName}.pdf $out
2023-10-13 22:28:34 +02:00
'';
};
default = document;
};
});
}