From 369c86e0ef8a713d47c2a6b94a3f70d527b84a3c Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 13 Dec 2019 00:08:56 +0000 Subject: fix(proto): Refactor gRPC dependencies to match new external layout This is now a lot more fine-grained than before, but it actually works fine. This stuff is a bit annoying to write by hand. There are multiple different options available (e.g. carrying an attribute set of all subpackages in each `external` and only passing that, having a tool generate this, etc.). --- proto.nix | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/proto.nix b/proto.nix index dd40def0ff1f..2ece948ebd84 100644 --- a/proto.nix +++ b/proto.nix @@ -19,11 +19,17 @@ in rec { xnet = external { path = "golang.org/x/net"; - deps = [ xtext ]; + src = fetchGit { url = "https://go.googlesource.com/net"; rev = "ffdde105785063a81acd95bdf89ea53f6e0aac2d"; }; + + deps = map (p: p.gopkg) [ + xtext.secure.bidirule + xtext.unicode.bidi + xtext.unicode.norm + ]; }; xsys = external { @@ -48,21 +54,31 @@ in rec { url = "https://github.com/google/go-genproto"; rev = "83cc0476cb11ea0da33dacd4c6354ab192de6fe6"; }; + + deps = with goProto; map (p: p.gopkg) [ + proto + ptypes.any + ]; }; goGrpc = external { path = "google.golang.org/grpc"; - deps = [ goProto xnet xsys genproto ]; + deps = map (p: p.gopkg) ([ + xnet.trace + xnet.http2 + xsys.unix + xnet.http2.hpack + genproto.googleapis.rpc.status + ] ++ (with goProto; [ + proto + ptypes + ptypes.duration + ptypes.timestamp + ])); src = fetchGit { url = "https://github.com/grpc/grpc-go"; rev = "d8e3da36ac481ef00e510ca119f6b68177713689"; }; - - targets = [ - "." - "codes" - "status" - ]; }; } -- cgit 1.4.1