From 7fbac93940a44cf6b790aba16d316d9531558187 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 6 Dec 2022 15:13:22 +0000 Subject: chore(nix/buildGo): drop buildGo.proto and buildGo.grpc As described in https://b.tvl.fyi/issues/221#comment-344, buildGo.proto was a mistake and should be removed. Change-Id: Ic588a5e8eea58e83e3ec9a37ac681ce526028718 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7536 Reviewed-by: tazjin Tested-by: BuildkiteCI --- nix/buildGo/default.nix | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'nix/buildGo/default.nix') diff --git a/nix/buildGo/default.nix b/nix/buildGo/default.nix index 97b8bd226492..bd2e32330060 100644 --- a/nix/buildGo/default.nix +++ b/nix/buildGo/default.nix @@ -111,33 +111,11 @@ let # named "gopkg", and an attribute named "gobin" for binaries. external = import ./external { inherit pkgs program package; }; - # Import support libraries needed for protobuf & gRPC support - protoLibs = import ./proto.nix { - inherit external; - }; - - # Build a Go library out of the specified protobuf definition. - proto = { name, proto, path ? name, goPackage ? name, extraDeps ? [ ] }: (makeOverridable package) { - inherit name path; - deps = [ protoLibs.goProto.proto.gopkg ] ++ extraDeps; - srcs = lib.singleton (runCommand "goproto-${name}.pb.go" { } '' - cp ${proto} ${baseNameOf proto} - ${protobuf}/bin/protoc --plugin=${protoLibs.goProto.protoc-gen-go.gopkg}/bin/protoc-gen-go \ - --go_out=plugins=grpc,import_path=${baseNameOf path}:. ${baseNameOf proto} - mv ./${goPackage}/*.pb.go $out - ''); - }; - - # Build a Go library out of the specified gRPC definition. - grpc = args: proto (args // { extraDeps = [ protoLibs.goGrpc.gopkg ]; }); - in { # Only the high-level builder functions are exposed, but made # overrideable. program = makeOverridable program; package = makeOverridable package; - proto = makeOverridable proto; - grpc = makeOverridable grpc; external = makeOverridable external; } -- cgit 1.4.1