protobuf_deps.bzl 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. """Load dependencies needed to compile the protobuf library as a 3rd-party consumer."""
  2. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
  3. def protobuf_deps():
  4. """Loads common dependencies needed to compile the protobuf library."""
  5. if not native.existing_rule("bazel_skylib"):
  6. http_archive(
  7. name = "bazel_skylib",
  8. sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d",
  9. strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b",
  10. urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"],
  11. )
  12. if not native.existing_rule("zlib"):
  13. http_archive(
  14. name = "zlib",
  15. build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
  16. sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff",
  17. strip_prefix = "zlib-1.2.11",
  18. urls = ["https://github.com/madler/zlib/archive/v1.2.11.tar.gz"],
  19. )
  20. if not native.existing_rule("six"):
  21. http_archive(
  22. name = "six",
  23. build_file = "@com_google_protobuf//:third_party/six.BUILD",
  24. sha256 = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73",
  25. urls = ["https://pypi.python.org/packages/source/s/six/six-1.12.0.tar.gz"],
  26. )
  27. if not native.existing_rule("rules_cc"):
  28. http_archive(
  29. name = "rules_cc",
  30. sha256 = "29daf0159f0cf552fcff60b49d8bcd4f08f08506d2da6e41b07058ec50cfeaec",
  31. strip_prefix = "rules_cc-b7fe9697c0c76ab2fd431a891dbb9a6a32ed7c3e",
  32. urls = ["https://github.com/bazelbuild/rules_cc/archive/b7fe9697c0c76ab2fd431a891dbb9a6a32ed7c3e.tar.gz"],
  33. )
  34. if not native.existing_rule("rules_java"):
  35. http_archive(
  36. name = "rules_java",
  37. sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3",
  38. strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd",
  39. urls = ["https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz"],
  40. )
  41. if not native.existing_rule("rules_proto"):
  42. http_archive(
  43. name = "rules_proto",
  44. sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208",
  45. strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313",
  46. urls = ["https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz"],
  47. )
  48. if not native.existing_rule("rules_python"):
  49. http_archive(
  50. name = "rules_python",
  51. sha256 = "e5470e92a18aa51830db99a4d9c492cc613761d5bdb7131c04bd92b9834380f6",
  52. strip_prefix = "rules_python-4b84ad270387a7c439ebdccfd530e2339601ef27",
  53. urls = ["https://github.com/bazelbuild/rules_python/archive/4b84ad270387a7c439ebdccfd530e2339601ef27.tar.gz"],
  54. )