diff options
author | Vincent Ambo <tazjin@google.com> | 2019-12-12T23·27+0000 |
---|---|---|
committer | Vincent Ambo <mail@tazj.in> | 2019-12-13T00·39+0000 |
commit | 0dfa5d15fae5b8f5992625f03586ba6043bcd475 (patch) | |
tree | 575bfdfeee0b401068ea2b3b71c77ce87a870cc5 /buildGo.nix | |
parent | 875628a0978937d708ce9365c9cc2061f39b0bca (diff) |
fix(buildGo): Update buildGo.proto for compatibility with external
Changes in the structure of buildGo.external meant that the package layout for the protobuf library is now slightly different. `proto` has been amended to work with the new structure. Callers of buildGo.proto do not need to be updated (i.e. the example still works).
Diffstat (limited to 'buildGo.nix')
-rw-r--r-- | buildGo.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/buildGo.nix b/buildGo.nix index a470c1db5f03..0df3c955aef1 100644 --- a/buildGo.nix +++ b/buildGo.nix @@ -76,8 +76,8 @@ let # directory that follows the standard Go layout and was not built # with buildGo.nix. # - # The derivation for each actual dependency will reside in an - # attribute named "gopkg". + # The derivation for each actual package will reside in an attribute + # named "gopkg", and an attribute named "gobin" for binaries. external = import ./external { inherit pkgs program package; }; # Import support libraries needed for protobuf & gRPC support @@ -88,10 +88,10 @@ let # Build a Go library out of the specified protobuf definition. proto = { name, proto, path ? name, extraDeps ? [] }: (makeOverridable package) { inherit name path; - deps = [ protoLibs'.protobuf ] ++ extraDeps; + deps = [ protoLibs.goProto.proto.gopkg ] ++ extraDeps; srcs = lib.singleton (runCommand "goproto-${name}.pb.go" {} '' cp ${proto} ${baseNameOf proto} - ${protobuf}/bin/protoc --plugin=${protoLibs.goProto}/bin/protoc-gen-go \ + ${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 *.pb.go $out ''); |