{ jekyll, stdenvNoCC, writeShellScriptBin }:

stdenvNoCC.mkDerivation rec {
  name = "infra4future.de-static";

  src = ./.;

  phases = [ "buildPhase" ];
  buildPhase = ''
    cd $src
    ${jekyll}/bin/jekyll build -d $out --disable-disk-cache
  '';

  watch = writeShellScriptBin "watch" ''
    cd $(git rev-parse --show-toplevel)/websites/infra4future.de
    rm -rf /tmp/hacc-website
    ${jekyll}/bin/jekyll serve --disable-disk-cache -d /tmp/hacc-website "$@"
  '';
}