From 254b008436f3649e77cd55154c77c949fdf3d3b4 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 22 Aug 2021 20:41:11 +0200 Subject: Provide generate function --- flake.nix | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 429d61a..5914731 100644 --- a/flake.nix +++ b/flake.nix @@ -16,9 +16,27 @@ pkgs-personal.katex-wrapper pkgs-personal.make-xslt ]; + }; + + generate = content: pkgs.stdenv.mkDerivation { + name = "blog.kummerlaender.eu"; + + src = ./.; + + LANG = "en_US.UTF-8"; + + buildInputs = [ + pkgs.pandoc + pkgs.highlight + pkgs-personal.katex-wrapper + pkgs-personal.make-xslt + ]; - shellHook = '' - export NIX_SHELL_NAME="blog.kummerlaender.eu" + installPhase = '' + cp -r ${content} source/00_content + make-xslt + mkdir $out + cp -Lr target/99_result/* $out ''; }; }; -- cgit v1.2.3