Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 1 | """Load dependencies needed to compile the protobuf library as a 3rd-party consumer.""" |
| 2 | |
| 3 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 4 | |
| 5 | def protobuf_deps(): |
| 6 | """Loads common dependencies needed to compile the protobuf library.""" |
| 7 | |
Yannic Bonenberger | bf0c69e | 2019-07-26 13:14:19 +0200 | [diff] [blame] | 8 | if not native.existing_rule("bazel_skylib"): |
| 9 | http_archive( |
| 10 | name = "bazel_skylib", |
Yannic | 948740b | 2020-01-15 19:27:35 +0100 | [diff] [blame] | 11 | sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44", |
| 12 | urls = [ |
| 13 | "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz", |
| 14 | "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz", |
| 15 | ], |
Yannic Bonenberger | bf0c69e | 2019-07-26 13:14:19 +0200 | [diff] [blame] | 16 | ) |
| 17 | |
Yannic Bonenberger | 6e89919 | 2019-07-23 16:28:57 +0200 | [diff] [blame] | 18 | if not native.existing_rule("zlib"): |
Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 19 | http_archive( |
Nic McDonald | f313b9c | 2019-04-12 15:41:08 -0700 | [diff] [blame] | 20 | name = "zlib", |
Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 21 | build_file = "@com_google_protobuf//:third_party/zlib.BUILD", |
Keith Smiley | 516f8b1 | 2019-08-28 21:41:02 -0700 | [diff] [blame] | 22 | sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff", |
Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 23 | strip_prefix = "zlib-1.2.11", |
Keith Smiley | 516f8b1 | 2019-08-28 21:41:02 -0700 | [diff] [blame] | 24 | urls = ["https://github.com/madler/zlib/archive/v1.2.11.tar.gz"], |
Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 25 | ) |
Adam Liddell | a74c43b | 2019-07-15 23:35:19 +0000 | [diff] [blame] | 26 | |
Yannic Bonenberger | 6e89919 | 2019-07-23 16:28:57 +0200 | [diff] [blame] | 27 | if not native.existing_rule("six"): |
Adam Liddell | a74c43b | 2019-07-15 23:35:19 +0000 | [diff] [blame] | 28 | http_archive( |
| 29 | name = "six", |
Adam Liddell | 8199a01 | 2019-07-21 21:02:48 +0000 | [diff] [blame] | 30 | build_file = "@com_google_protobuf//:third_party/six.BUILD", |
Adam Liddell | 23e520e | 2019-07-16 15:17:28 +0000 | [diff] [blame] | 31 | sha256 = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73", |
| 32 | urls = ["https://pypi.python.org/packages/source/s/six/six-1.12.0.tar.gz"], |
Adam Liddell | a74c43b | 2019-07-15 23:35:19 +0000 | [diff] [blame] | 33 | ) |
Yannic Bonenberger | 6e89919 | 2019-07-23 16:28:57 +0200 | [diff] [blame] | 34 | |
| 35 | if not native.existing_rule("rules_cc"): |
| 36 | http_archive( |
| 37 | name = "rules_cc", |
Andreas Herrmann | 24fa955 | 2020-05-26 10:07:20 +0200 | [diff] [blame] | 38 | sha256 = "9d48151ea71b3e225adfb6867e6d2c7d0dce46cbdc8710d9a9a628574dfd40a0", |
| 39 | strip_prefix = "rules_cc-818289e5613731ae410efb54218a4077fb9dbb03", |
| 40 | urls = ["https://github.com/bazelbuild/rules_cc/archive/818289e5613731ae410efb54218a4077fb9dbb03.tar.gz"], |
Yannic Bonenberger | 6e89919 | 2019-07-23 16:28:57 +0200 | [diff] [blame] | 41 | ) |
| 42 | |
| 43 | if not native.existing_rule("rules_java"): |
| 44 | http_archive( |
| 45 | name = "rules_java", |
| 46 | sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3", |
| 47 | strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd", |
| 48 | urls = ["https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz"], |
| 49 | ) |
| 50 | |
| 51 | if not native.existing_rule("rules_proto"): |
| 52 | http_archive( |
| 53 | name = "rules_proto", |
Dor | ee04809 | 2021-04-09 21:12:25 +0300 | [diff] [blame] | 54 | sha256 = "a4382f78723af788f0bc19fd4c8411f44ffe0a72723670a34692ffad56ada3ac", |
| 55 | strip_prefix = "rules_proto-f7a30f6f80006b591fa7c437fe5a951eb10bcbcf", |
| 56 | urls = ["https://github.com/bazelbuild/rules_proto/archive/f7a30f6f80006b591fa7c437fe5a951eb10bcbcf.zip"], |
Yannic Bonenberger | d2d6ff5 | 2019-08-06 21:12:06 +0200 | [diff] [blame] | 57 | ) |
| 58 | |
| 59 | if not native.existing_rule("rules_python"): |
| 60 | http_archive( |
| 61 | name = "rules_python", |
| 62 | sha256 = "e5470e92a18aa51830db99a4d9c492cc613761d5bdb7131c04bd92b9834380f6", |
| 63 | strip_prefix = "rules_python-4b84ad270387a7c439ebdccfd530e2339601ef27", |
| 64 | urls = ["https://github.com/bazelbuild/rules_python/archive/4b84ad270387a7c439ebdccfd530e2339601ef27.tar.gz"], |
Yannic Bonenberger | 6e89919 | 2019-07-23 16:28:57 +0200 | [diff] [blame] | 65 | ) |
Derek Perez | bc45f92 | 2021-04-20 11:36:32 -0700 | [diff] [blame] | 66 | |
| 67 | if not native.existing_rule("rules_jvm_external"): |
| 68 | http_archive( |
| 69 | name = "rules_jvm_external", |
| 70 | sha256 = "31701ad93dbfe544d597dbe62c9a1fdd76d81d8a9150c2bf1ecf928ecdf97169", |
| 71 | strip_prefix = "rules_jvm_external-4.0", |
| 72 | urls = ["https://github.com/bazelbuild/rules_jvm_external/archive/4.0.zip"], |
| 73 | ) |