Skip to content

Commit

Permalink
nix: add nix-update to .#generate
Browse files Browse the repository at this point in the history
This will update the vendor hash if needed.

Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Jan 5, 2024
1 parent 9593b09 commit 22c7ac8
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
'';
};

Expand Down

0 comments on commit 22c7ac8

Please sign in to comment.