From a85d8033c7d636ebd65d8d0f26797b631252197f Mon Sep 17 00:00:00 2001 From: Franz Kafka Date: Sun, 22 Mar 2026 11:28:31 +0000 Subject: [PATCH] fix(flake): remove stale vendorHash; auto-compute on next build The go.mod changes (goquery downgrade, x/net replace) invalidate the old vendorHash. Set to empty to auto-recompute, then replace with the actual hash from the build error. --- flake.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index d143495..fc8613b 100644 --- a/flake.nix +++ b/flake.nix @@ -21,13 +21,16 @@ version = "0.1.0"; src = ./.; - vendorHash = "sha256-NbAa4QM/TI3BTuZs4glx9k3ZjSl2/2LQfKlQ7izR8Ho="; + vendorHash = ""; # auto-computed; update with actual hash after first build # Run: nix build .#packages.x86_64-linux.default - # It will fail with the correct hash. Replace it here. + # It will fail with the correct hash. Replace vendorHash with it. # Embed the templates and static files at build time. ldflags = [ "-s" "-w" ]; + # Remove stale vendor directory when dependencies change. + preBuild = "rm -rf vendor"; + nativeCheckInputs = with pkgs; [ ]; # Tests require network; they run in CI instead.