2024-04-06 21:16:43 +00:00
|
|
|
{ copyPathToStore, stdenvNoCC, zola, writeScriptBin }:
|
2024-01-11 21:53:02 +00:00
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
name = "docs.hacc.space-static";
|
|
|
|
|
2024-04-06 21:16:43 +00:00
|
|
|
src = ./.;
|
|
|
|
content = copyPathToStore ../../docs;
|
2024-01-11 21:53:02 +00:00
|
|
|
|
|
|
|
phases = [ "buildPhase" ];
|
|
|
|
buildInputs = [ zola ];
|
|
|
|
buildPhase = ''
|
2024-01-11 23:31:32 +00:00
|
|
|
cp -r $src/* .
|
|
|
|
rm content
|
2024-04-06 21:16:43 +00:00
|
|
|
ln -s $content content
|
2024-01-11 21:53:02 +00:00
|
|
|
zola build --output-dir $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
watch = writeScriptBin "watch" ''
|
2024-01-11 23:41:15 +00:00
|
|
|
cd $(git rev-parse --show-toplevel)/websites/docs.hacc.space
|
|
|
|
${zola}/bin/zola serve --output-dir /tmp/hacc-docs "$@"
|
2024-01-11 21:53:02 +00:00
|
|
|
'';
|
|
|
|
}
|