Skip to content

Commit

Permalink
protoc-gen-go-grpc: adopt (NixOS#365488)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Dec 22, 2024
2 parents 31413db + b79f3cd commit 9fe47b7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
16 changes: 15 additions & 1 deletion pkgs/by-name/op/opensnitch/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,21 @@
opensnitch,
nixosTests,
}:
let
# Override protoc-gen-go-grpc to use the compatible version
protoc-gen-go-grpc' = protoc-gen-go-grpc.overrideAttrs (oldAttrs: rec {
version = "1.3.0";

src = fetchFromGitHub {
owner = "grpc";
repo = "grpc-go";
rev = "cmd/protoc-gen-go-grpc/v${version}";
hash = "sha256-Zy0k5X/KFzCao9xAGt5DNb0MMGEyqmEsDj+uvXI4xH4=";
};

vendorHash = "sha256-y+/hjYUTFZuq55YAZ5M4T1cwIR+XFQBmWVE+Cg1Y7PI=";
});
in
buildGoModule rec {
pname = "opensnitch";
version = "1.6.6";
Expand Down Expand Up @@ -43,7 +57,7 @@ buildGoModule rec {
protobuf
go-protobuf
makeWrapper
protoc-gen-go-grpc
protoc-gen-go-grpc'
];

vendorHash = "sha256-urRujxcp58ZuhUtTAqCK0etSZ16YYG/6JY/aOUodl9g=";
Expand Down
18 changes: 12 additions & 6 deletions pkgs/by-name/pr/protoc-gen-go-grpc/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,28 @@

buildGoModule rec {
pname = "protoc-gen-go-grpc";
version = "1.3.0";
version = "1.5.1";
modRoot = "cmd/protoc-gen-go-grpc";

src = fetchFromGitHub {
owner = "grpc";
repo = "grpc-go";
rev = "cmd/protoc-gen-go-grpc/v${version}";
sha256 = "sha256-Zy0k5X/KFzCao9xAGt5DNb0MMGEyqmEsDj+uvXI4xH4=";
hash = "sha256-PAUM0chkZCb4hGDQtCgHF3omPm0jP1sSDolx4EuOwXo=";
};

vendorHash = "sha256-y+/hjYUTFZuq55YAZ5M4T1cwIR+XFQBmWVE+Cg1Y7PI=";
vendorHash = "sha256-yn6jo6Ku/bnbSX8FL0B/Uu3Knn59r1arjhsVUkZ0m9g=";

meta = with lib; {
ldflags = [
"-s"
"-w"
];

meta = {
description = "Go language implementation of gRPC. HTTP/2 based RPC";
homepage = "https://grpc.io/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ aaronjheng ];
mainProgram = "protoc-gen-go-grpc";
license = licenses.asl20;
maintainers = [ ];
};
}

0 comments on commit 9fe47b7

Please sign in to comment.