"""Load dependencies needed to compile and test the grpc library as a 3rd-party consumer.""" load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def grpc_deps(): """Loads dependencies need to compile and test the grpc library.""" native.bind( name = "nanopb", actual = "@com_github_nanopb_nanopb//:nanopb", ) native.bind( name = "upblib", actual = "@upb//:upb", ) native.bind( name = "absl-base", actual = "@com_google_absl//absl/base", ) native.bind( name = "absl-time", actual = "@com_google_absl//absl/time:time", ) native.bind( name = "libssl", actual = "@boringssl//:ssl", ) native.bind( name = "zlib", actual = "@com_github_madler_zlib//:z", ) native.bind( name = "protobuf", actual = "@com_google_protobuf//:protobuf", ) native.bind( name = "protobuf_clib", actual = "@com_google_protobuf//:protoc_lib", ) native.bind( name = "protobuf_headers", actual = "@com_google_protobuf//:protobuf_headers", ) native.bind( name = "protocol_compiler", actual = "@com_google_protobuf//:protoc", ) native.bind( name = "cares", actual = "@com_github_cares_cares//:ares", ) native.bind( name = "gtest", actual = "@com_github_google_googletest//:gtest", ) native.bind( name = "gmock", actual = "@com_github_google_googletest//:gmock", ) native.bind( name = "benchmark", actual = "@com_github_google_benchmark//:benchmark", ) native.bind( name = "gflags", actual = "@com_github_gflags_gflags//:gflags", ) native.bind( name = "grpc_cpp_plugin", actual = "@com_github_grpc_grpc//:grpc_cpp_plugin", ) native.bind( name = "grpc++_codegen_proto", actual = "@com_github_grpc_grpc//:grpc++_codegen_proto", ) native.bind( name = "opencensus-trace", actual = "@io_opencensus_cpp//opencensus/trace:trace", ) native.bind( name = "opencensus-stats", actual = "@io_opencensus_cpp//opencensus/stats:stats", ) native.bind( name = "opencensus-stats-test", actual = "@io_opencensus_cpp//opencensus/stats:test_utils", ) if "boringssl" not in native.existing_rules(): http_archive( name = "boringssl", # on the chromium-stable-with-bazel branch url = "https://boringssl.googlesource.com/boringssl/+archive/afc30d43eef92979b05776ec0963c9cede5fb80f.tar.gz", ) if "com_github_madler_zlib" not in native.existing_rules(): http_archive( name = "com_github_madler_zlib", build_file = "@com_github_grpc_grpc//third_party:zlib.BUILD", strip_prefix = "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f", url = "https://github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz", ) if "com_google_protobuf" not in native.existing_rules(): http_archive( name = "com_google_protobuf", strip_prefix = "protobuf-66dc42d891a4fc8e9190c524fd67961688a37bbe", url = "https://github.com/google/protobuf/archive/66dc42d891a4fc8e9190c524fd67961688a37bbe.tar.gz", ) if "com_github_nanopb_nanopb" not in native.existing_rules(): http_archive( name = "com_github_nanopb_nanopb", build_file = "@com_github_grpc_grpc//third_party:nanopb.BUILD", strip_prefix = "nanopb-f8ac463766281625ad710900479130c7fcb4d63b", url = "https://github.com/nanopb/nanopb/archive/f8ac463766281625ad710900479130c7fcb4d63b.tar.gz", ) if "com_github_google_googletest" not in native.existing_rules(): http_archive( name = "com_github_google_googletest", build_file = "@com_github_grpc_grpc//third_party:gtest.BUILD", strip_prefix = "googletest-ec44c6c1675c25b9827aacd08c02433cccde7780", url = "https://github.com/google/googletest/archive/ec44c6c1675c25b9827aacd08c02433cccde7780.tar.gz", ) if "com_github_gflags_gflags" not in native.existing_rules(): http_archive( name = "com_github_gflags_gflags", strip_prefix = "gflags-28f50e0fed19872e0fd50dd23ce2ee8cd759338e", url = "https://github.com/gflags/gflags/archive/28f50e0fed19872e0fd50dd23ce2ee8cd759338e.tar.gz", ) if "com_github_google_benchmark" not in native.existing_rules(): http_archive( name = "com_github_google_benchmark", #build_file = "@com_github_grpc_grpc//third_party:benchmark.BUILD", strip_prefix = "benchmark-e776aa0275e293707b6a0901e0e8d8a8a3679508", url = "https://github.com/google/benchmark/archive/e776aa0275e293707b6a0901e0e8d8a8a3679508.tar.gz", ) if "com_github_cares_cares" not in native.existing_rules(): http_archive( name = "com_github_cares_cares", build_file = "@com_github_grpc_grpc//third_party:cares/cares.BUILD", strip_prefix = "c-ares-3be1924221e1326df520f8498d704a5c4c8d0cce", url = "https://github.com/c-ares/c-ares/archive/3be1924221e1326df520f8498d704a5c4c8d0cce.tar.gz", ) if "com_google_absl" not in native.existing_rules(): http_archive( name = "com_google_absl", strip_prefix = "abseil-cpp-308ce31528a7edfa39f5f6d36142278a0ae1bf45", url = "https://github.com/abseil/abseil-cpp/archive/308ce31528a7edfa39f5f6d36142278a0ae1bf45.tar.gz", ) if "com_github_bazelbuild_bazeltoolchains" not in native.existing_rules(): http_archive( name = "com_github_bazelbuild_bazeltoolchains", strip_prefix = "bazel-toolchains-37419a124bdb9af2fec5b99a973d359b6b899b61", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/37419a124bdb9af2fec5b99a973d359b6b899b61.tar.gz", "https://github.com/bazelbuild/bazel-toolchains/archive/37419a124bdb9af2fec5b99a973d359b6b899b61.tar.gz", ], sha256 = "ee854b5de299138c1f4a2edb5573d22b21d975acfc7aa938f36d30b49ef97498", ) if "bazel_skylib" not in native.existing_rules(): http_archive( name = "bazel_skylib", sha256 = "ba5d15ca230efca96320085d8e4d58da826d1f81b444ef8afccd8b23e0799b52", strip_prefix = "bazel-skylib-f83cb8dd6f5658bc574ccd873e25197055265d1c", url = "https://github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz", ) if "io_opencensus_cpp" not in native.existing_rules(): http_archive( name = "io_opencensus_cpp", strip_prefix = "opencensus-cpp-03dff0352522983ffdee48cedbf87cbe37f1bb7f", url = "https://github.com/census-instrumentation/opencensus-cpp/archive/03dff0352522983ffdee48cedbf87cbe37f1bb7f.tar.gz", ) if "upb" not in native.existing_rules(): http_archive( name = "upb", strip_prefix = "upb-9ce4a77f61c134bbed28bfd5be5cd7dc0e80f5e3", url = "https://github.com/google/upb/archive/9ce4a77f61c134bbed28bfd5be5cd7dc0e80f5e3.tar.gz", ) # TODO: move some dependencies from "grpc_deps" here? def grpc_test_only_deps(): """Internal, not intended for use by packages that are consuming grpc. Loads dependencies that are only needed to run grpc library's tests.""" native.bind( name = "twisted", actual = "@com_github_twisted_twisted//:twisted", ) native.bind( name = "yaml", actual = "@com_github_yaml_pyyaml//:yaml", ) if "com_github_twisted_twisted" not in native.existing_rules(): http_archive( name = "com_github_twisted_twisted", strip_prefix = "twisted-twisted-17.5.0", url = "https://github.com/twisted/twisted/archive/twisted-17.5.0.zip", build_file = "@com_github_grpc_grpc//third_party:twisted.BUILD", ) if "com_github_yaml_pyyaml" not in native.existing_rules(): http_archive( name = "com_github_yaml_pyyaml", strip_prefix = "pyyaml-3.12", url = "https://github.com/yaml/pyyaml/archive/3.12.zip", build_file = "@com_github_grpc_grpc//third_party:yaml.BUILD", ) if "com_github_twisted_incremental" not in native.existing_rules(): http_archive( name = "com_github_twisted_incremental", strip_prefix = "incremental-incremental-17.5.0", url = "https://github.com/twisted/incremental/archive/incremental-17.5.0.zip", build_file = "@com_github_grpc_grpc//third_party:incremental.BUILD", ) if "com_github_zopefoundation_zope_interface" not in native.existing_rules(): http_archive( name = "com_github_zopefoundation_zope_interface", strip_prefix = "zope.interface-4.4.3", url = "https://github.com/zopefoundation/zope.interface/archive/4.4.3.zip", build_file = "@com_github_grpc_grpc//third_party:zope_interface.BUILD", ) if "com_github_twisted_constantly" not in native.existing_rules(): http_archive( name = "com_github_twisted_constantly", strip_prefix = "constantly-15.1.0", url = "https://github.com/twisted/constantly/archive/15.1.0.zip", build_file = "@com_github_grpc_grpc//third_party:constantly.BUILD", )