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 | 92f2c89 | 2019-07-23 16:28:57 +0200 | [diff] [blame] | 8 | if not native.existing_rule("zlib"): |
Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 9 | http_archive( |
Nic McDonald | f313b9c | 2019-04-12 15:41:08 -0700 | [diff] [blame] | 10 | name = "zlib", |
Kent Ross | b6375e0 | 2019-02-26 10:07:55 -0800 | [diff] [blame] | 11 | build_file = "@com_google_protobuf//:third_party/zlib.BUILD", |
| 12 | sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", |
| 13 | strip_prefix = "zlib-1.2.11", |
| 14 | urls = ["https://zlib.net/zlib-1.2.11.tar.gz"], |
| 15 | ) |
Yannic Bonenberger | 92f2c89 | 2019-07-23 16:28:57 +0200 | [diff] [blame] | 16 | |
| 17 | if not native.existing_rule("six"): |
| 18 | http_archive( |
| 19 | name = "six", |
| 20 | build_file = "@//:six.BUILD", |
| 21 | sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a", |
| 22 | urls = ["https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55"], |
| 23 | ) |
| 24 | |
| 25 | if not native.existing_rule("rules_cc"): |
| 26 | http_archive( |
| 27 | name = "rules_cc", |
| 28 | sha256 = "29daf0159f0cf552fcff60b49d8bcd4f08f08506d2da6e41b07058ec50cfeaec", |
| 29 | strip_prefix = "rules_cc-b7fe9697c0c76ab2fd431a891dbb9a6a32ed7c3e", |
| 30 | urls = ["https://github.com/bazelbuild/rules_cc/archive/b7fe9697c0c76ab2fd431a891dbb9a6a32ed7c3e.tar.gz"], |
| 31 | ) |
| 32 | |
| 33 | if not native.existing_rule("rules_java"): |
| 34 | http_archive( |
| 35 | name = "rules_java", |
| 36 | sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3", |
| 37 | strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd", |
| 38 | urls = ["https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz"], |
| 39 | ) |
| 40 | |
| 41 | if not native.existing_rule("rules_proto"): |
| 42 | http_archive( |
| 43 | name = "rules_proto", |
| 44 | sha256 = "88b0a90433866b44bb4450d4c30bc5738b8c4f9c9ba14e9661deb123f56a833d", |
| 45 | strip_prefix = "rules_proto-b0cc14be5da05168b01db282fe93bdf17aa2b9f4", |
| 46 | urls = ["https://github.com/bazelbuild/rules_proto/archive/b0cc14be5da05168b01db282fe93bdf17aa2b9f4.tar.gz"], |
| 47 | ) |