{ lib, stdenv, hextra, hugo, buildProxy ? null }: stdenv.mkDerivation { name = "blog"; src = ./.; nativeBuildInputs = [ hugo ]; preBuild = lib.optionalString (buildProxy != null) ''source ${buildProxy}''; configurePhase = '' mkdir themes ln -s ${hextra} themes/hextra ''; buildPhase = '' runHook preBuild hugo runHook postBuild ''; installPhase = "cp -r public $out"; }