Files
nixpkgs/pkgs/by-name/gr/grpc-gateway/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

54 lines
1.6 KiB
Nix

{
buildGoModule,
fetchFromGitHub,
lib,
testers,
grpc-gateway,
}:
buildGoModule rec {
pname = "grpc-gateway";
version = "2.27.2";
src = fetchFromGitHub {
owner = "grpc-ecosystem";
repo = "grpc-gateway";
tag = "v${version}";
sha256 = "sha256-NWMpCPtZZVa53SR8NqSaDpo6fauB3hHb1PeqNs0OO+M=";
};
vendorHash = "sha256-NYiHnarNAndE3QIKPI51plWNNB9kP2DlpYgW43Uw/gw=";
ldflags = [
"-X=main.version=${version}"
"-X=main.date=1970-01-01T00:00:00Z"
"-X=main.commit=${version}"
];
passthru.tests = {
version = testers.testVersion {
package = grpc-gateway;
command = "protoc-gen-grpc-gateway --version";
version = "Version ${version}, commit ${version}, built at 1970-01-01T00:00:00Z";
};
openapiv2Version = testers.testVersion {
package = grpc-gateway;
command = "protoc-gen-openapiv2 --version";
version = "Version ${version}, commit ${version}, built at 1970-01-01T00:00:00Z";
};
};
meta = with lib; {
description = "GRPC to JSON proxy generator plugin for Google Protocol Buffers";
longDescription = ''
This is a plugin for the Google Protocol Buffers compiler (protoc). It reads
protobuf service definitions and generates a reverse-proxy server which
translates a RESTful HTTP API into gRPC. This server is generated according to
the google.api.http annotations in the protobuf service definitions.
'';
homepage = "https://github.com/grpc-ecosystem/grpc-gateway";
license = licenses.bsd3;
maintainers = with maintainers; [ happyalu ];
};
}