From a1f6487f8110df62d120114b8a88e84c94cf6278 Mon Sep 17 00:00:00 2001 From: chn Date: Sun, 1 Jun 2025 11:04:32 +0800 Subject: [PATCH] fix build --- default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index d49d276..3226aa9 100644 --- a/default.nix +++ b/default.nix @@ -1,13 +1,19 @@ -{ stdenv, hextra, hugo }: stdenv.mkDerivation +{ 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 = "hugo"; + buildPhase = + '' + runHook preBuild + hugo + runHook postBuild + ''; installPhase = "cp -r public $out"; }