1
0
Fork 0
curriculum-vitae/flake.nix

43 lines
1.1 KiB
Nix
Raw Permalink 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";
2023-10-13 22:28:34 +02:00
};
outputs = { self, nixpkgs, flake-utils}:
2024-06-19 15:24:26 +02:00
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
2024-01-13 19:52:18 +01:00
inputName = "cv";
2023-10-13 22:28:34 +02:00
in {
2024-06-19 15:24:26 +02:00
packages.x86_64-linux = rec {
2023-10-13 22:28:34 +02:00
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;
};
2024-06-19 15:17:26 +02:00
hydraJobs = {
inherit (self) packages;
};
2024-06-19 15:24:26 +02:00
};
2023-10-13 22:28:34 +02:00
}