| # Copyright 2017 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/go/go_library.gni") |
| |
| template("third_party_go_library") { |
| go_library(target_name) { |
| forward_variables_from(invoker, |
| [ |
| "name", |
| "source_dir", |
| "deps", |
| ]) |
| allow_globbing = true |
| } |
| } |
| |
| template("golib") { |
| third_party_go_library(target_name) { |
| name = target_name + "/..." |
| source_dir = "//third_party/golibs/$name" |
| forward_variables_from(invoker, [ "deps" ]) |
| } |
| } |
| |
| ##### NOTE: keep the following targets in alphabetical order. |
| |
| ### cloud.google.com/* |
| third_party_go_library("cloud.google.com/go/compute/metadata") { |
| name = "cloud.google.com/go/compute/metadata/..." |
| source_dir = "//third_party/golibs/github.com/googleapis/google-cloud-go/compute/metadata" |
| } |
| third_party_go_library("cloud.google.com/go/iam") { |
| name = "cloud.google.com/go/iam/..." |
| source_dir = "//third_party/golibs/github.com/googleapis/google-cloud-go/iam" |
| deps = [ |
| ":cloud.google.com/go/internal", |
| ":github.com/googleapis/gax-go/v2", |
| ":google.golang.org/genproto/googleapis/iam/v1", |
| ":google.golang.org/grpc", |
| ] |
| } |
| |
| # Actually aggregates the dependencies of other cloud.google.com/go/internal/* |
| # packages as well. Use this as a convenience target for any such package. |
| third_party_go_library("cloud.google.com/go/internal") { |
| name = "cloud.google.com/go/internal/..." |
| source_dir = |
| "//third_party/golibs/github.com/googleapis/google-cloud-go/internal" |
| deps = [ |
| ":github.com/golang/protobuf", |
| ":github.com/google/go-cmp", |
| ":go.opencensus.io", |
| ":golang.org/x/oauth2", |
| ":google.golang.org/api/googleapi", |
| ":google.golang.org/genproto/googleapis/rpc/code", |
| ":google.golang.org/grpc", |
| ] |
| } |
| third_party_go_library("cloud.google.com/go/storage") { |
| name = "cloud.google.com/go/storage/..." |
| source_dir = |
| "//third_party/golibs/github.com/googleapis/google-cloud-go/storage" |
| deps = [ |
| ":cloud.google.com/go/iam", |
| ":cloud.google.com/go/internal", |
| ":github.com/googleapis/gax-go/v2", |
| ":google.golang.org/api/googleapi", |
| ":google.golang.org/api/iterator", |
| ":google.golang.org/api/option", |
| ":google.golang.org/api/storage/v1", |
| ":google.golang.org/api/transport", |
| ":google.golang.org/genproto/googleapis/iam/v1", |
| ] |
| } |
| |
| ### github.com/* |
| golib("github.com/creack/pty") { |
| } |
| golib("github.com/dustin/go-humanize") { |
| } |
| golib("github.com/flynn/go-docopt") { |
| } |
| golib("github.com/flynn/go-tuf") { |
| deps = [ |
| ":github.com/dustin/go-humanize", |
| ":github.com/flynn/go-docopt", |
| ":github.com/syndtr/goleveldb", |
| ":github.com/tent/canonical-json-go", |
| ":golang.org/x/crypto", |
| ] |
| } |
| golib("github.com/fsnotify/fsnotify") { |
| deps = [ ":golang.org/x/sys" ] |
| } |
| golib("github.com/go-yaml/yaml") { |
| } |
| golib("github.com/golang/glog") { |
| } |
| |
| # Actually aggregates the dependencies of other google.golang.org/protobuf/* |
| # packages as well. Use this as a convenience target for any such package. |
| golib("github.com/golang/protobuf") { |
| deps = [ |
| ":golang.org/x/net", |
| ":google.golang.org/protobuf", |
| ] |
| } |
| golib("github.com/googleapis/gax-go/v2") { |
| deps = [ ":google.golang.org/grpc" ] |
| } |
| golib("github.com/google/btree") { |
| } |
| golib("github.com/google/go-cmp") { |
| deps = [ ":golang.org/x/xerrors" ] |
| } |
| golib("github.com/golang/groupcache/lru") { |
| } |
| golib("github.com/golang/snappy") { |
| } |
| golib("github.com/google/shlex") { |
| } |
| golib("github.com/google/subcommands") { |
| } |
| golib("github.com/google/uuid") { |
| } |
| golib("github.com/kr/fs") { |
| } |
| golib("github.com/kr/pretty") { |
| deps = [ ":github.com/kr/text" ] |
| } |
| golib("github.com/kr/text") { |
| } |
| golib("github.com/pkg/errors") { |
| } |
| golib("github.com/pkg/sftp") { |
| deps = [ |
| ":github.com/kr/fs", |
| ":github.com/pkg/errors", |
| ":golang.org/x/crypto", |
| ] |
| } |
| golib("github.com/syndtr/goleveldb") { |
| deps = [ ":github.com/golang/snappy" ] |
| } |
| golib("github.com/tent/canonical-json-go") { |
| } |
| |
| ### go.opencensus.io/* |
| # Actually aggregates the dependencies of other go.opencensus.io/* |
| # packages as well. Use this as a convenience target for any such package. |
| third_party_go_library("go.opencensus.io") { |
| name = "go.opencensus.io/..." |
| source_dir = |
| "//third_party/golibs/github.com/census-instrumentation/opencensus-go" |
| deps = [ |
| ":github.com/golang/groupcache/lru", |
| ":google.golang.org/grpc", |
| ] |
| } |
| |
| golib("go.uber.org/atomic") { |
| } |
| golib("go.uber.org/multierr") { |
| deps = [ ":go.uber.org/atomic" ] |
| } |
| |
| ### golang.org/x/* |
| golib("golang.org/x/crypto") { |
| deps = [ |
| ":golang.org/x/net", |
| ":golang.org/x/sys", |
| ] |
| } |
| golib("golang.org/x/net") { |
| deps = [ |
| ":golang.org/x/sys", |
| ":golang.org/x/text", |
| ] |
| } |
| golib("golang.org/x/time") { |
| } |
| golib("golang.org/x/oauth2") { |
| deps = [ |
| ":cloud.google.com/go/compute/metadata", |
| ":golang.org/x/net", |
| ] |
| } |
| golib("golang.org/x/sync") { |
| } |
| golib("golang.org/x/sys") { |
| } |
| third_party_go_library("golang.org/x/text") { |
| name = "golang.org/x/text/..." |
| source_dir = "//third_party/golibs/github.com/golang/text" |
| } |
| golib("golang.org/x/xerrors") { |
| } |
| |
| ### google.golang.org/* |
| third_party_go_library( |
| "google.golang.org/genproto/googleapis/api/annotations") { |
| name = "google.golang.org/genproto/googleapis/api/annotations/..." |
| source_dir = "//third_party/golibs/github.com/googleapis/go-genproto/googleapis/api/annotations" |
| deps = [ ":github.com/golang/protobuf" ] |
| } |
| third_party_go_library("google.golang.org/genproto/googleapis/iam/v1") { |
| name = "google.golang.org/genproto/googleapis/iam/v1/..." |
| source_dir = |
| "//third_party/golibs/github.com/googleapis/go-genproto/googleapis/iam/v1" |
| deps = [ |
| ":github.com/golang/protobuf", |
| ":google.golang.org/genproto/googleapis/api/annotations", |
| ":google.golang.org/genproto/googleapis/type/expr", |
| ":google.golang.org/grpc", |
| ] |
| } |
| third_party_go_library("google.golang.org/genproto/googleapis/rpc/code") { |
| name = "google.golang.org/genproto/googleapis/rpc/code/..." |
| source_dir = "//third_party/golibs/github.com/googleapis/go-genproto/googleapis/rpc/code" |
| deps = [ ":github.com/golang/protobuf" ] |
| } |
| third_party_go_library("google.golang.org/genproto/googleapis/rpc/status") { |
| name = "google.golang.org/genproto/googleapis/rpc/status/..." |
| source_dir = "//third_party/golibs/github.com/googleapis/go-genproto/googleapis/rpc/status" |
| deps = [ ":github.com/golang/protobuf" ] |
| } |
| third_party_go_library("google.golang.org/genproto/googleapis/type/expr") { |
| name = "google.golang.org/genproto/googleapis/type/expr/..." |
| source_dir = "//third_party/golibs/github.com/googleapis/go-genproto/googleapis/type/expr" |
| deps = [ ":github.com/golang/protobuf" ] |
| } |
| |
| # Actually aggregates the dependencies of other google.golang.org/grpc/* |
| # packages as well. Use this as a convenience target for any such package. |
| third_party_go_library("google.golang.org/grpc") { |
| name = "google.golang.org/grpc/..." |
| source_dir = "//third_party/golibs/github.com/grpc/grpc-go" |
| deps = [ |
| ":golang.org/x/net", |
| ":golang.org/x/sys", |
| ":google.golang.org/genproto/googleapis/rpc/status", |
| ] |
| } |
| third_party_go_library("google.golang.org/api/gensupport") { |
| name = "google.golang.org/api/gensupport/..." |
| source_dir = "//third_party/golibs/github.com/googleapis/google-api-go-client/gensupport" |
| deps = [ ":google.golang.org/api/googleapi" ] |
| } |
| third_party_go_library("google.golang.org/api/googleapi") { |
| name = "google.golang.org/api/googleapi/..." |
| source_dir = "//third_party/golibs/github.com/googleapis/google-api-go-client/googleapi" |
| } |
| third_party_go_library("google.golang.org/api/internal") { |
| name = "google.golang.org/api/internal/..." |
| source_dir = |
| "//third_party/golibs/github.com/googleapis/google-api-go-client/internal" |
| deps = [ |
| ":golang.org/x/oauth2", |
| ":google.golang.org/grpc", |
| ] |
| } |
| third_party_go_library("google.golang.org/api/iterator") { |
| name = "google.golang.org/api/iterator/..." |
| source_dir = |
| "//third_party/golibs/github.com/googleapis/google-api-go-client/iterator" |
| } |
| third_party_go_library("google.golang.org/api/option") { |
| name = "google.golang.org/api/option/..." |
| source_dir = |
| "//third_party/golibs/github.com/googleapis/google-api-go-client/option" |
| deps = [ |
| ":golang.org/x/oauth2", |
| ":google.golang.org/api/internal", |
| ":google.golang.org/grpc", |
| ] |
| } |
| third_party_go_library("google.golang.org/api/storage/v1") { |
| name = "google.golang.org/api/storage/v1/..." |
| source_dir = "//third_party/golibs/github.com/googleapis/google-api-go-client/storage/v1" |
| deps = [ |
| ":google.golang.org/api/gensupport", |
| ":google.golang.org/api/googleapi", |
| ":google.golang.org/api/option", |
| ":google.golang.org/api/transport", |
| ] |
| } |
| third_party_go_library("google.golang.org/api/transport") { |
| name = "google.golang.org/api/transport/..." |
| source_dir = "//third_party/golibs/github.com/googleapis/google-api-go-client/transport" |
| deps = [ |
| ":go.opencensus.io", |
| ":google.golang.org/api/googleapi", |
| ":google.golang.org/api/internal", |
| ":google.golang.org/api/option", |
| ] |
| } |
| third_party_go_library("google.golang.org/protobuf") { |
| name = "google.golang.org/protobuf/..." |
| source_dir = "//third_party/golibs/github.com/protocolbuffers/protobuf-go" |
| } |
| |
| ### gopkg.in/* |
| third_party_go_library("gopkg.in/check.v1") { |
| name = "gopkg.in/check.v1/..." |
| source_dir = "//third_party/golibs/github.com/go-check/check" |
| deps = [ ":github.com/kr/pretty" ] |
| } |
| |
| golib("gvisor.dev/gvisor") { |
| deps = [ |
| ":github.com/golang/protobuf", |
| ":golang.org/x/sys", |
| ":golang.org/x/time", |
| ] |
| } |