flake.nix: make the build process more robust

This commit is contained in:
Vojtěch Káně
2025-07-03 14:37:54 +02:00
parent 7c6ce30f48
commit 18384ad175

View File

@@ -18,10 +18,12 @@
pname = "vkane.cz"; pname = "vkane.cz";
version = ""; version = "";
src = self; src = self;
# the theme is included as a submodule, and with nix it is an alchemy whether it is somehow included or not (in which case the empty parent directory might be missing)
preConfigure = '' preConfigure = ''
rm --dir --force themes/hermit rm --dir --force themes/hermit
mkdir -p themes
ln --symbolic '${hermit}' themes/hermit ln --symbolic '${hermit}' themes/hermit
''; # TODO '';
buildPhase = '' buildPhase = ''
'${pkgs.hugo}'/bin/hugo --buildExpired --buildFuture --destination "$out" --minify --printPathWarnings --printI18nWarnings '${pkgs.hugo}'/bin/hugo --buildExpired --buildFuture --destination "$out" --minify --printPathWarnings --printI18nWarnings
''; '';