xref: /aosp_15_r20/external/tink/go/WORKSPACE (revision e7b1675dde1b92d52ec075b0a92829627f2c52a5)
1workspace(name = "tink_go")
2
3load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
4
5http_file(
6    name = "google_root_pem",
7    executable = 0,
8    sha256 = "9c9b9685ad319b9747c3fe69b46a61c11a0efabdfa09ca6a8b0c3da421036d27",
9    urls = ["https://pki.goog/roots.pem"],
10)
11
12# -------------------------------------------------------------------------
13# Bazel Skylib.
14# -------------------------------------------------------------------------
15# Release from 2023-02-09
16# Protobuf vX.21.9 imports a version of bazel-skylib [1] that is incompatible
17# with the one required by bazel-gazelle, so we make sure we have a newer
18# version [2].
19#
20# [1] https://github.com/protocolbuffers/protobuf/blob/90b73ac3f0b10320315c2ca0d03a5a9b095d2f66/protobuf_deps.bzl#L28
21# [2] https://github.com/bazelbuild/bazel-gazelle/issues/1290#issuecomment-1312809060
22http_archive(
23    name = "bazel_skylib",
24    sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7",
25    urls = [
26        "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
27        "https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
28    ],
29)
30
31# -------------------------------------------------------------------------
32# Wycheproof.
33# -------------------------------------------------------------------------
34# Commit from 2019-12-17
35http_archive(
36    name = "wycheproof",
37    sha256 = "eb1d558071acf1aa6d677d7f1cabec2328d1cf8381496c17185bd92b52ce7545",
38    strip_prefix = "wycheproof-d8ed1ba95ac4c551db67f410c06131c3bc00a97c",
39    url = "https://github.com/google/wycheproof/archive/d8ed1ba95ac4c551db67f410c06131c3bc00a97c.zip",
40)
41
42# -------------------------------------------------------------------------
43# Protobuf.
44# -------------------------------------------------------------------------
45# proto_library, cc_proto_library and java_proto_library rules implicitly
46# depend respectively on:
47#   * @com_google_protobuf//:proto
48#   * @com_google_protobuf//:cc_toolchain
49#   * @com_google_protobuf//:java_toolchain
50# This statement defines the @com_google_protobuf repo.
51# Release X.21.9 from 2022-10-26.
52http_archive(
53    name = "com_google_protobuf",
54    strip_prefix = "protobuf-21.9",
55    urls = ["https://github.com/protocolbuffers/protobuf/archive/refs/tags/v21.9.zip"],
56    sha256 = "5babb8571f1cceafe0c18e13ddb3be556e87e12ceea3463d6b0d0064e6cc1ac3",
57)
58
59load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
60
61protobuf_deps()
62
63# -------------------------------------------------------------------------
64# Bazel rules for Go.
65# -------------------------------------------------------------------------
66# Release from 2023-04-20
67http_archive(
68    name = "io_bazel_rules_go",
69    sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996",
70    urls = [
71        "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
72        "https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
73    ],
74)
75
76# -------------------------------------------------------------------------
77# Bazel Gazelle.
78# -------------------------------------------------------------------------
79# Release from 2023-01-14
80http_archive(
81    name = "bazel_gazelle",
82    sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d",
83    urls = [
84        "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
85        "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
86    ],
87)
88
89load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
90
91# -------------------------------------------------------------------------
92# Tink Go Deps.
93# -------------------------------------------------------------------------
94load("//:deps.bzl", "go_dependencies")
95
96# gazelle:repository_macro deps.bzl%go_dependencies
97go_dependencies()
98
99load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
100
101go_rules_dependencies()
102
103go_register_toolchains(
104    nogo = "@//:tink_nogo",
105    version = "1.19.9",
106)
107
108gazelle_dependencies()
109