1load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
3load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
4
5def upb_deps():
6    maybe(
7        git_repository,
8        name = "com_google_absl",
9        commit = "df3ea785d8c30a9503321a3d35ee7d35808f190d",  # LTS 2020-02-25
10        remote = "https://github.com/abseil/abseil-cpp.git",
11        shallow_since = "1583355457 -0500",
12    )
13
14    maybe(
15        git_repository,
16        name = "com_google_protobuf",
17        remote = "https://github.com/protocolbuffers/protobuf.git",
18        commit = "c8f76331abf682c289fa79f05b2ee39cc7bf5a48",  # Need to use Git until proto3 optional is released
19    )
20
21    maybe(
22        http_archive,
23        name = "rules_python",
24        sha256 = "e5470e92a18aa51830db99a4d9c492cc613761d5bdb7131c04bd92b9834380f6",
25        strip_prefix = "rules_python-4b84ad270387a7c439ebdccfd530e2339601ef27",
26        urls = [
27            "https://mirror.bazel.build/github.com/bazelbuild/rules_python/archive/4b84ad270387a7c439ebdccfd530e2339601ef27.tar.gz",
28            "https://github.com/bazelbuild/rules_python/archive/4b84ad270387a7c439ebdccfd530e2339601ef27.tar.gz",
29        ],
30    )
31
32    maybe(
33        http_archive,
34        name = "bazel_skylib",
35        strip_prefix = "bazel-skylib-master",
36        urls = ["https://github.com/bazelbuild/bazel-skylib/archive/master.tar.gz"],
37    )
38
39    maybe(
40        http_archive,
41        name = "zlib",
42        build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
43        sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff",
44        strip_prefix = "zlib-1.2.11",
45        url = "https://github.com/madler/zlib/archive/v1.2.11.tar.gz",
46    )
47