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.).
This commit is contained in:
		
							parent
							
								
									41c28cf60e
								
							
						
					
					
						commit
						369c86e0ef
					
				
					 1 changed files with 24 additions and 8 deletions
				
			
		
							
								
								
									
										32
									
								
								proto.nix
									
										
									
									
									
								
							
							
						
						
									
										32
									
								
								proto.nix
									
										
									
									
									
								
							| 
						 | 
					@ -19,11 +19,17 @@ in rec {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  xnet = external {
 | 
					  xnet = external {
 | 
				
			||||||
    path = "golang.org/x/net";
 | 
					    path = "golang.org/x/net";
 | 
				
			||||||
    deps = [ xtext ];
 | 
					
 | 
				
			||||||
    src = fetchGit {
 | 
					    src = fetchGit {
 | 
				
			||||||
      url = "https://go.googlesource.com/net";
 | 
					      url = "https://go.googlesource.com/net";
 | 
				
			||||||
      rev = "ffdde105785063a81acd95bdf89ea53f6e0aac2d";
 | 
					      rev = "ffdde105785063a81acd95bdf89ea53f6e0aac2d";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    deps = map (p: p.gopkg) [
 | 
				
			||||||
 | 
					      xtext.secure.bidirule
 | 
				
			||||||
 | 
					      xtext.unicode.bidi
 | 
				
			||||||
 | 
					      xtext.unicode.norm
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  xsys = external {
 | 
					  xsys = external {
 | 
				
			||||||
| 
						 | 
					@ -48,21 +54,31 @@ in rec {
 | 
				
			||||||
      url = "https://github.com/google/go-genproto";
 | 
					      url = "https://github.com/google/go-genproto";
 | 
				
			||||||
      rev = "83cc0476cb11ea0da33dacd4c6354ab192de6fe6";
 | 
					      rev = "83cc0476cb11ea0da33dacd4c6354ab192de6fe6";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    deps = with goProto; map (p: p.gopkg) [
 | 
				
			||||||
 | 
					      proto
 | 
				
			||||||
 | 
					      ptypes.any
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  goGrpc = external {
 | 
					  goGrpc = external {
 | 
				
			||||||
    path = "google.golang.org/grpc";
 | 
					    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 {
 | 
					    src = fetchGit {
 | 
				
			||||||
      url = "https://github.com/grpc/grpc-go";
 | 
					      url = "https://github.com/grpc/grpc-go";
 | 
				
			||||||
      rev = "d8e3da36ac481ef00e510ca119f6b68177713689";
 | 
					      rev = "d8e3da36ac481ef00e510ca119f6b68177713689";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					 | 
				
			||||||
    targets = [
 | 
					 | 
				
			||||||
      "."
 | 
					 | 
				
			||||||
      "codes"
 | 
					 | 
				
			||||||
      "status"
 | 
					 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue