From 2698ed0c80a90e6c2143e04513d3baaa67e924a6 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 2 Jul 2024 14:56:17 +0200 Subject: Ignore result files and add custom nix build+install phases --- .gitignore | 1 + .nix/derivation.nix | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a136337..06891d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.pdf +result* diff --git a/.nix/derivation.nix b/.nix/derivation.nix index 93437eb..abf51a8 100644 --- a/.nix/derivation.nix +++ b/.nix/derivation.nix @@ -9,9 +9,18 @@ stdenv.mkDerivation { pname = "kel-cv"; version = "0.0.0"; + src = ./..; + nativeBuildInputs = [ typst - ]; + ]; - src = ./..; + buildPhase = '' + typst compile --root . templates/cv.typ ./cv.pdf + ''; + + installPhase = '' + mkdir -p $out + mv cv.pdf $out/ + ''; } -- cgit v1.2.3