1workspace(name = "bazel_remote_apis") 2 3load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 4 5http_archive( 6 name = "bazel_skylib", 7 sha256 = "66ffd9315665bfaafc96b52278f57c7e2dd09f5ede279ea6d39b2be471e7e3aa", 8 urls = [ 9 "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz", 10 "https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz", 11 ], 12) 13 14load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") 15 16bazel_skylib_workspace() 17 18# Pull in go rules, which we need in order to selectively pull in Go dependencies. 19http_archive( 20 name = "io_bazel_rules_go", 21 sha256 = "d6ab6b57e48c09523e93050f13698f708428cfd5e619252e369d377af6597707", 22 urls = [ 23 "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.43.0/rules_go-v0.43.0.zip", 24 "https://github.com/bazelbuild/rules_go/releases/download/v0.43.0/rules_go-v0.43.0.zip", 25 ], 26) 27 28# Gazelle, which we need in order to selectively pull in Gazelle dependencies for Go. 29http_archive( 30 name = "bazel_gazelle", 31 sha256 = "b7387f72efb59f876e4daae42f1d3912d0d45563eac7cb23d1de0b094ab588cf", 32 urls = [ 33 "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.34.0/bazel-gazelle-v0.34.0.tar.gz", 34 "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.34.0/bazel-gazelle-v0.34.0.tar.gz", 35 ], 36) 37 38# Needed for protobuf. 39http_archive( 40 name = "com_google_protobuf", 41 sha256 = "535fbf566d372ccf3a097c374b26896fa044bf4232aef9cab37bd1cc1ba4e850", 42 strip_prefix = "protobuf-3.15.0", 43 urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.15.0.zip"], 44) 45 46load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") 47 48protobuf_deps() 49 50# Needed for C++ gRPC. 51http_archive( 52 name = "com_github_grpc_grpc", 53 sha256 = "b391a327429279f6f29b9ae7e5317cd80d5e9d49cc100e6d682221af73d984a6", 54 strip_prefix = "grpc-93e8830070e9afcbaa992c75817009ee3f4b63a0", # v1.24.3 with fixes 55 urls = ["https://github.com/grpc/grpc/archive/93e8830070e9afcbaa992c75817009ee3f4b63a0.zip"], 56) 57 58# Pull in all gRPC dependencies. 59load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") 60 61grpc_deps() 62 63# More gRPC dependencies. grpc_extra_deps does not work out of the box. 64load("@upb//bazel:workspace_deps.bzl", "upb_deps") 65load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies") 66load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies") 67 68upb_deps() 69 70apple_rules_dependencies() 71 72apple_support_dependencies() 73 74load("@upb//bazel:repository_defs.bzl", "bazel_version_repository") 75 76bazel_version_repository( 77 name = "bazel_version", 78) 79 80bind( 81 name = "grpc_cpp_plugin", 82 actual = "@com_github_grpc_grpc//:grpc_cpp_plugin", 83) 84 85bind( 86 name = "grpc_lib", 87 actual = "@com_github_grpc_grpc//:grpc++", 88) 89 90load("//:remote_apis_deps.bzl", "remote_apis_go_deps") 91 92remote_apis_go_deps() 93 94# Needed for the googleapis protos. 95http_archive( 96 name = "googleapis", 97 sha256 = "b28c13e99001664eac5f1fb81b44d912d19fbc041e30772263251da131f6573c", 98 strip_prefix = "googleapis-bb964feba5980ed70c9fb8f84fe6e86694df65b0", 99 urls = ["https://github.com/googleapis/googleapis/archive/bb964feba5980ed70c9fb8f84fe6e86694df65b0.zip"], 100) 101 102load("@googleapis//:repository_rules.bzl", "switched_rules_by_language") 103 104switched_rules_by_language( 105 name = "com_google_googleapis_imports", 106) 107