From c81e9e18986059420faef01ccbe491611b4220a3 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 0144b6b9b..c5671ea23 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 ''; };