diff options
author | Florian Klink <flokli@flokli.de> | 2022-12-06T15·13+0000 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2022-12-26T11·17+0000 |
commit | 7fbac93940a44cf6b790aba16d316d9531558187 (patch) | |
tree | e4f6cb9186e761894e6b58e9f37b8b61b52b8dc4 /nix/buildGo/default.nix | |
parent | c6cb13856549907729e76035c818303f3c1fd244 (diff) |
chore(nix/buildGo): drop buildGo.proto and buildGo.grpc r/5491
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 <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'nix/buildGo/default.nix')
-rw-r--r-- | nix/buildGo/default.nix | 22 |
1 files changed, 0 insertions, 22 deletions
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; } |