From 22c7ac8470ebc5602b75afd6e35712af9021262d Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Fri, 5 Jan 2024 10:17:23 +0100 Subject: [PATCH] nix: add nix-update to .#generate This will update the vendor hash if needed. Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- packages/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/default.nix b/packages/default.nix index 7e43aa9a3..fb3d69fd7 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -100,10 +100,21 @@ rec { generate = writeShellApplication { name = "generate"; - runtimeInputs = [ go protobuf protoc-gen-go protoc-gen-go-grpc ]; + runtimeInputs = [ + go + protobuf + protoc-gen-go + protoc-gen-go-grpc + nix-update + ]; text = '' - go generate ./... go mod tidy + go generate ./... + + # All binaries of the local Go module share the same builder, + # we only need to update one of them to update the vendorHash + # of the builder. + nix-update --version=skip --flake cli ''; };