-
Notifications
You must be signed in to change notification settings - Fork 5
/
WORKSPACE.bazel
261 lines (201 loc) · 8.13 KB
/
WORKSPACE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
workspace(
name = "dre",
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
http_archive(
name = "bazel_skylib",
sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz",
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
http_archive(
name = "rules_python",
sha256 = "c285495ee02df843a337c78617c196b7a87ea11da8961b7dd5ae28d43f9a1d85",
strip_prefix = "rules_python-c5c03b2477dd1ce0c06c9dc60bf816995f222bcf",
url = "https://github.com/bazelbuild/rules_python/archive/c5c03b2477dd1ce0c06c9dc60bf816995f222bcf.zip",
)
http_file(
name = "target_determinator",
sha256 = "306071a0037fd9074d7b878a9a489597878b6035606f8ed60ef9baaf81074228",
url = "https://github.com/bazel-contrib/target-determinator/releases/download/v0.28.0/target-determinator.linux.amd64",
)
http_file(
name = "bazelisk_linux",
sha256 = "d9af1fa808c0529753c3befda75123236a711d971d3485a390507122148773a3",
url = "https://github.com/bazelbuild/bazelisk/releases/download/v1.20.0/bazelisk-linux-amd64",
)
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
py_repositories()
python_register_toolchains(
name = "python3_12",
python_version = "3.12.2",
)
load("@python3_12//:defs.bzl", "interpreter")
load("@rules_python//python:pip.bzl", "pip_parse")
pip_parse(
name = "python_deps",
python_interpreter_target = interpreter,
requirements_lock = "//:requirements.lock",
)
load("@python_deps//:requirements.bzl", "install_deps")
install_deps()
http_archive(
name = "aspect_bazel_lib",
sha256 = "3e0a430ada9b8f0f845767a267cf584bc94b8ec642d6093f31dca3938b18f6a1",
strip_prefix = "bazel-lib-2.6.0",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.6.0/bazel-lib-v2.6.0.tar.gz",
)
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "aspect_bazel_lib_register_toolchains")
# Required bazel-lib dependencies
aspect_bazel_lib_dependencies()
# Register bazel-lib toolchains
aspect_bazel_lib_register_toolchains()
IC_REPO_VERSION = "a700085f0575a440cb44941da69cfa2efeea3ab9"
http_archive(
name = "ic_repo",
sha256 = "34426b59612b23357799be48aed82870d298f7dbee96c9792ee3fe744ad2c2e3",
strip_prefix = "ic-{}".format(IC_REPO_VERSION),
url = "https://github.com/dfinity/ic/archive/{}.tar.gz".format(IC_REPO_VERSION),
)
http_archive(
name = "rules_rust",
sha256 = "6357de5982dd32526e02278221bb8d6aa45717ba9bbacf43686b130aa2c72e1e",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.30.0/rules_rust-v0.30.0.tar.gz"],
)
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
load("@rules_rust//tools/rust_analyzer:deps.bzl", "rust_analyzer_dependencies")
rules_rust_dependencies()
rust_analyzer_dependencies()
rust_register_toolchains(
edition = "2021",
versions = [
"1.80.0",
],
)
load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
crate_universe_dependencies()
load("//bazel:external_crates.bzl", "external_crates_repository")
external_crates_repository()
load("@crate_index_dre//:defs.bzl", "crate_repositories")
crate_repositories()
http_file(
name = "ic-icrc1-archive",
downloaded_file_path = "ic-icrc1-archive.wasm.gz",
sha256 = "6e9869a0d51a4e0f6b6f111958c06fbca0a6476483d6048a512d4df845ebe0ae",
url = "https://download.dfinity.systems/ic/778d2bb870f858952ca9fbe69324f9864e3cf5e7/canisters/ic-icrc1-archive.wasm.gz",
)
http_archive(
name = "com_google_protobuf",
sha256 = "bc3dbf1f09dba1b2eb3f2f70352ee97b9049066c9040ce0c9b67fb3294e91e4b",
strip_prefix = "protobuf-3.15.5",
# this version is imported through io_bazel_rules_go in IC repo
urls = [
"https://github.com/protocolbuffers/protobuf/archive/v3.15.5.tar.gz",
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.15.5.tar.gz",
],
)
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
RULES_FOREIGN_CC_VERSION = "9acbb356916760192d4c16301a69267fe44e6dec"
http_archive(
name = "rules_foreign_cc",
sha256 = "db6fcdb4f5ac217658f2c3aabd61e618d7fadc1cdf7d806ab1b52f2709d3fc66",
strip_prefix = "rules_foreign_cc-{}".format(RULES_FOREIGN_CC_VERSION),
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/{}.tar.gz".format(RULES_FOREIGN_CC_VERSION),
)
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
rules_foreign_cc_dependencies()
http_archive(
name = "rules_oci",
sha256 = "176e601d21d1151efd88b6b027a24e782493c5d623d8c6211c7767f306d655c8",
strip_prefix = "rules_oci-1.2.0",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v1.2.0/rules_oci-v1.2.0.tar.gz",
)
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "LATEST_CRANE_VERSION", "oci_register_toolchains")
oci_register_toolchains(
name = "oci",
crane_version = LATEST_CRANE_VERSION,
)
load("@rules_oci//oci:pull.bzl", "oci_pull")
load("//3rdparty/bazel-rules-openssl:repos.bzl", openssl_repos="repos")
openssl_repos()
load("@com_github_3rdparty_bazel_rules_openssl//bazel:deps.bzl", openssl_deps="deps")
openssl_deps()
oci_pull(
# Debian 12 image has a newer glibc than Debian 11 in regular distrolles containers.
# https://console.cloud.google.com/gcr/images/distroless/global/cc-debian12
name = "distroless_cc_debian12",
# Note: this is a "debug" image, which means that it has busybox, so also a shell at /busybox/sh
# https://github.com/GoogleContainerTools/distroless/tree/9dc924b9fe812eec2fa0061824dcad39eb09d0d6?tab=readme-ov-file#debug-images
digest = "sha256:53895c8e3a37652d075d22dde58f40b310daa4a7a59d078b8a7f604d11b1adc6",
image = "gcr.io/distroless/cc-debian12",
platforms = [
"linux/amd64",
"linux/arm64",
],
reproducible = True,
)
oci_pull(
# tag = 0.34.1-distroless-libc
name = "vector",
digest = "sha256:4447025bc3a99b3a96ed0352e990c44040784590de5a1ea8e4e5b75b76a16665",
image = "index.docker.io/timberio/vector",
)
oci_pull(
# tag = 0.38.0-debian
name = "vector-debian",
digest = "sha256:f33f11c554d522fb9a3d1725c9212725da8f1eee70a3971e587e78d46e72a779",
image = "index.docker.io/timberio/vector",
)
oci_pull(
# tag = "2.44.0-debian-12-r2",
name = "bitnami_git_docker_img",
digest = "sha256:bbd4ffc32f62b2b7bb2b85f289803d564a0381a2c75fd61f19f8bfc0815791e4",
image = "index.docker.io/bitnami/git",
reproducible = True,
platforms = [
"linux/amd64",
"linux/arm64",
],
)
oci_pull(
# tag = bookworm-20231218-slim
name = "debian-slim",
digest = "sha256:45287d89d96414e57c7705aa30cb8f9836ef30ae8897440dd8f06c4cff801eec",
image = "index.docker.io/library/debian",
)
oci_pull(
name = "distroless_python3",
digest = "sha256:db34936540e7bc575cc24a318e41eae7ad8c426b8d8e20a465f0dd67843590eb",
image = "gcr.io/distroless/python3",
platforms = [
"linux/amd64",
"linux/arm64",
],
)
oci_pull(
name = "python3",
digest = "sha256:5120c734a5ba810c47b97a80cdc6e03004bd4ff7ad98e492b9ccdaf70ff2b8d6",
image = "index.docker.io/library/python",
)
oci_pull(
name = "bazel_image_6_5_0",
digest = "sha256:7506002de2e90431e194f8391f4600b57cf229280002b2fc473b88a95d7104bc",
image = "gcr.io/bazel-public/bazel",
)
http_archive(
name = "rules_pkg",
sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz",
],
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()