forked from hacc/haccfiles
stuebinm
5e51d5f252
this does slight tweaking of paths to make the docs.hacc.space derivation no longer depend on our entire flake, so we won't have to rebuild it as often.
22 lines
519 B
Nix
22 lines
519 B
Nix
{ copyPathToStore, stdenvNoCC, zola, writeScriptBin }:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
name = "docs.hacc.space-static";
|
|
|
|
src = ./.;
|
|
content = copyPathToStore ../../docs;
|
|
|
|
phases = [ "buildPhase" ];
|
|
buildInputs = [ zola ];
|
|
buildPhase = ''
|
|
cp -r $src/* .
|
|
rm content
|
|
ln -s $content content
|
|
zola build --output-dir $out
|
|
'';
|
|
|
|
watch = writeScriptBin "watch" ''
|
|
cd $(git rev-parse --show-toplevel)/websites/docs.hacc.space
|
|
${zola}/bin/zola serve --output-dir /tmp/hacc-docs "$@"
|
|
'';
|
|
}
|