feat(third_party/gopkgs): Import external packages for Google Cloud

These packages contain the Cloud SDK for Go. There is currently a
linker issue (presumably due to something in `buildGo.nix`) that means
that projects using them can not actually be built.
This commit is contained in:
Vincent Ambo 2019-12-13 12:12:06 +00:00
parent 8b10c8d0f3
commit 9594203e07
12 changed files with 178 additions and 0 deletions

View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
pkgs.buildGo.external {
path = "github.com/golang/protobuf";
src = builtins.fetchGit {
url = "https://github.com/golang/protobuf";
rev = "4c88cc3f1a34ffade77b79abc53335d1e511f25b";
};
deps = with pkgs.third_party; [
];
}

View file

@ -0,0 +1,19 @@
{ pkgs, ... }:
let
inherit (pkgs) buildGo;
inherit (builtins) fetchGit;
in pkgs.buildGo.external {
path = "github.com/googleapis/gax-go";
src = fetchGit {
url = "https://github.com/googleapis/gax-go";
rev = "bd5b16380fd03dc758d11cef74ba2e3bc8b0e8c2";
};
deps = with pkgs.third_party; [
gopkgs."golang.org".x.net.trace.gopkg
gopkgs."google.golang.org".grpc.gopkg
gopkgs."google.golang.org".grpc.codes.gopkg
gopkgs."google.golang.org".grpc.status.gopkg
];
}

View file

@ -0,0 +1,14 @@
{ pkgs, ... }:
pkgs.buildGo.external {
path = "github.com/hashicorp/golang-lru";
src = builtins.fetchGit {
url = "https://github.com/hashicorp/golang-lru";
rev = "7f827b33c0f158ec5dfbba01bb0b14a4541fd81d";
};
deps = with pkgs.third_party; map (p: p.gopkg) [
gopkgs."golang.org".x.net.context.ctxhttp
gopkgs."cloud.google.com".go.compute.metadata
];
}