blob: bd114a0885ac528190785ab0fef112f960cbc1c6 [file] [log] [blame]
Tony Aiuto337e7172020-12-09 10:20:14 -08001# Copyright 2020 The Bazel Authors. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
Googlerbd7a6b92022-02-24 07:38:58 -08007# http://www.apache.org/licenses/LICENSE-2.0
Tony Aiuto337e7172020-12-09 10:20:14 -08008#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
Xavier Bonaventurafc4d9d62021-12-08 02:17:49 -080014"""List the distribution dependencies we need to build Bazel.
15
16Note for Bazel users: This is not the file that you are looking for.
17This is internal source and is not intended to tell you what version
18you should use for each dependency.
19"""
Tony Aiuto337e7172020-12-09 10:20:14 -080020
21DIST_DEPS = {
Tony Aiuto1c9e7ca2021-01-05 08:01:21 -080022 ########################################
23 #
24 # Runtime language dependencies
25 #
26 ########################################
Tony Aiutoe973aef2021-01-11 00:32:51 -080027 "platforms": {
aiuto676a0c82022-02-09 08:08:17 -080028 "archive": "platforms-0.0.5.tar.gz",
29 "sha256": "379113459b0feaf6bfbb584a91874c065078aa673222846ac765f86661c27407",
Tony Aiutoe973aef2021-01-11 00:32:51 -080030 "urls": [
aiuto676a0c82022-02-09 08:08:17 -080031 "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.5/platforms-0.0.5.tar.gz",
32 "https://github.com/bazelbuild/platforms/releases/download/0.0.5/platforms-0.0.5.tar.gz",
Tony Aiutoe973aef2021-01-11 00:32:51 -080033 ],
34 "used_in": [
35 "additional_distfiles",
36 "test_WORKSPACE_files",
37 ],
38 },
Chi Wang26b94ff2021-09-28 23:42:26 -070039 "bazelci_rules": {
40 "archive": "bazelci_rules-1.0.0.tar.gz",
41 "sha256": "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e",
42 "strip_prefix": "bazelci_rules-1.0.0",
Tony Aiutoe973aef2021-01-11 00:32:51 -080043 "urls": [
Chi Wang38a22d12021-12-06 08:30:58 -080044 "https://mirror.bazel.build/github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz",
Chi Wang26b94ff2021-09-28 23:42:26 -070045 "https://github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz",
Tony Aiutoe973aef2021-01-11 00:32:51 -080046 ],
47 "used_in": [
48 "additional_distfiles",
49 ],
50 },
Tony Aiuto1c9e7ca2021-01-05 08:01:21 -080051 # Keep in sync with src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/cc_configure.WORKSPACE.
52 # Keep in sync with src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE.
53 # Note: This is not in sync with src/test/java/com/google/devtools/build/lib/blackbox/framework/BlackBoxTestEnvironment.java.
54 # Perhaps it should be.
Tony Aiuto337e7172020-12-09 10:20:14 -080055 "rules_cc": {
56 "archive": "b1c40e1de81913a3c40e5948f78719c28152486d.zip",
57 "sha256": "d0c573b94a6ef20ef6ff20154a23d0efcb409fb0e1ff0979cec318dfe42f0cdd",
58 "strip_prefix": "rules_cc-b1c40e1de81913a3c40e5948f78719c28152486d",
59 "urls": [
60 "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip",
61 "https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip",
62 ],
Tony Aiutoe973aef2021-01-11 00:32:51 -080063 "used_in": [
64 "additional_distfiles",
65 "test_WORKSPACE_files",
66 ],
Tony Aiuto337e7172020-12-09 10:20:14 -080067 },
Tony Aiutob15a8b42021-01-08 07:42:57 -080068 "rules_java": {
69 "archive": "7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
70 "sha256": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
71 "strip_prefix": "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178",
72 "urls": [
73 "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
74 "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
75 ],
76 "used_in": [
77 "additional_distfiles",
78 "test_WORKSPACE_files",
79 ],
Tony Aiutob15a8b42021-01-08 07:42:57 -080080 },
Tony Aiuto320bc942021-01-14 07:43:21 -080081 # TODO(aiuto): Update src/test/java/com/google/devtools/build/lib/blackbox/framework/BlackBoxTestEnvironment.java to use
82 # this dynamically.
83 "rules_proto": {
84 "archive": "7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz",
85 "sha256": "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da",
86 "strip_prefix": "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488",
87 "urls": [
88 "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz",
89 "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz",
90 ],
91 "used_in": [
92 "additional_distfiles",
93 "test_WORKSPACE_files",
94 ],
95 },
Tony Aiutoe973aef2021-01-11 00:32:51 -080096 #################################################
Tony Aiuto1c9e7ca2021-01-05 08:01:21 -080097 #
Tony Aiutoe973aef2021-01-11 00:32:51 -080098 # Dependencies which are part of the Bazel binary
Tony Aiuto1c9e7ca2021-01-05 08:01:21 -080099 #
Tony Aiutoe973aef2021-01-11 00:32:51 -0800100 #################################################
101 "com_google_protobuf": {
Chi Wangb9e89e32022-01-20 08:52:53 -0800102 "archive": "v3.19.2.tar.gz",
103 "sha256": "4dd35e788944b7686aac898f77df4e9a54da0ca694b8801bd6b2a9ffc1b3085e",
104 "strip_prefix": "protobuf-3.19.2",
Tony Aiutoe973aef2021-01-11 00:32:51 -0800105 "urls": [
Chi Wangb9e89e32022-01-20 08:52:53 -0800106 "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.19.2.tar.gz",
107 "https://github.com/protocolbuffers/protobuf/archive/v3.19.2.tar.gz",
Tony Aiutoe973aef2021-01-11 00:32:51 -0800108 ],
109 "patch_args": ["-p1"],
Chi Wangb9e89e32022-01-20 08:52:53 -0800110 "patches": ["//third_party/protobuf:3.19.2.patch"],
Tony Aiutoe973aef2021-01-11 00:32:51 -0800111 "used_in": [
112 "additional_distfiles",
113 "test_WORKSPACE_files",
114 ],
115 },
Tony Aiuto320bc942021-01-14 07:43:21 -0800116 "protocolbuffers": {
Benjamin Petersonc01219e2021-10-25 02:29:55 -0700117 "archive": "2de300726a1ba2de9a468468dc5ff9ed17a3215f.tar.gz",
118 "sha256": "6a5f67874af66b239b709c572ac1a5a00fdb1b29beaf13c3e6f79b1ba10dc7c4",
Tony Aiuto320bc942021-01-14 07:43:21 -0800119 "urls": [
Benjamin Petersonc01219e2021-10-25 02:29:55 -0700120 "https://mirror.bazel.build/github.com/protocolbuffers/upb/archive/2de300726a1ba2de9a468468dc5ff9ed17a3215f.tar.gz",
121 "https://github.com/protocolbuffers/upb/archive/2de300726a1ba2de9a468468dc5ff9ed17a3215f.tar.gz",
Tony Aiuto320bc942021-01-14 07:43:21 -0800122 ],
123 "used_in": [
124 "additional_distfiles",
125 "test_WORKSPACE_files",
126 ],
127 },
Tony Aiutoe973aef2021-01-11 00:32:51 -0800128 "com_github_grpc_grpc": {
Benjamin Petersonc01219e2021-10-25 02:29:55 -0700129 "archive": "v1.41.0.tar.gz",
130 "sha256": "e5fb30aae1fa1cffa4ce00aa0bbfab908c0b899fcf0bbc30e268367d660d8656",
131 "strip_prefix": "grpc-1.41.0",
Tony Aiutoe973aef2021-01-11 00:32:51 -0800132 "urls": [
Benjamin Petersonc01219e2021-10-25 02:29:55 -0700133 "https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.41.0.tar.gz",
134 "https://github.com/grpc/grpc/archive/v1.41.0.tar.gz",
Tony Aiutoe973aef2021-01-11 00:32:51 -0800135 ],
136 "patch_args": ["-p1"],
137 "patches": [
Benjamin Petersonc01219e2021-10-25 02:29:55 -0700138 "//third_party/grpc:grpc_1.41.0.patch",
Niyas Sait0ba4caa2022-02-02 10:29:06 -0800139 "//third_party/grpc:grpc_1.41.0.win_arm64.patch",
Tony Aiutoe973aef2021-01-11 00:32:51 -0800140 ],
141 "used_in": [
142 "additional_distfiles",
143 "test_WORKSPACE_files",
144 ],
145 },
146 "c-ares": {
147 "archive": "e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz",
148 "sha256": "e8c2751ddc70fed9dc6f999acd92e232d5846f009ee1674f8aee81f19b2b915a",
149 "urls": [
150 "https://mirror.bazel.build/github.com/c-ares/c-ares/archive/e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz",
151 "https://github.com/c-ares/c-ares/archive/e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz",
152 ],
153 "used_in": [
154 "additional_distfiles",
155 "test_WORKSPACE_files",
156 ],
157 },
158 "re2": {
159 "archive": "aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz",
160 "sha256": "9f385e146410a8150b6f4cb1a57eab7ec806ced48d427554b1e754877ff26c3e",
161 "urls": [
162 "https://mirror.bazel.build/github.com/google/re2/archive/aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz",
163 "https://github.com/google/re2/archive/aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz",
164 ],
165 "used_in": [
166 "additional_distfiles",
167 "test_WORKSPACE_files",
168 ],
169 },
170 "abseil-cpp": {
Benjamin Petersonc01219e2021-10-25 02:29:55 -0700171 "archive": "997aaf3a28308eba1b9156aa35ab7bca9688e9f6.tar.gz",
172 "sha256": "35f22ef5cb286f09954b7cc4c85b5a3f6221c9d4df6b8c4a1e9d399555b366ee",
Tony Aiutoe973aef2021-01-11 00:32:51 -0800173 "urls": [
Benjamin Petersonc01219e2021-10-25 02:29:55 -0700174 "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/997aaf3a28308eba1b9156aa35ab7bca9688e9f6.tar.gz",
175 "https://github.com/abseil/abseil-cpp/archive/997aaf3a28308eba1b9156aa35ab7bca9688e9f6.tar.gz",
Tony Aiutoe973aef2021-01-11 00:32:51 -0800176 ],
177 "used_in": [
178 "additional_distfiles",
179 "test_WORKSPACE_files",
180 ],
181 },
Alessandro Patti6da80862021-11-11 22:49:37 -0800182 "zstd-jni": {
183 "archive": "v1.5.0-4.zip",
184 "patch_args": ["-p1"],
185 "patches": [
186 "//third_party:zstd-jni/Native.java.patch",
187 ],
188 "sha256": "d320d59b89a163c5efccbe4915ae6a49883ce653cdc670643dfa21c6063108e4",
189 "urls": [
190 "https://mirror.bazel.build/github.com/luben/zstd-jni/archive/v1.5.0-4.zip",
191 "https://github.com/luben/zstd-jni/archive/v1.5.0-4.zip",
192 ],
193 "used_in": [
194 "additional_distfiles",
195 ],
196 },
Tony Aiutoe973aef2021-01-11 00:32:51 -0800197 ###################################################
198 #
199 # Build time dependencies for testing and packaging
200 #
201 ###################################################
Tony Aiuto2b7ec5c2021-01-11 07:50:26 -0800202 "bazel_skylib": {
203 "archive": "bazel-skylib-1.0.3.tar.gz",
204 "sha256": "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
205 "urls": [
206 "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
207 "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
208 ],
209 "used_in": [
210 "additional_distfiles",
211 "test_WORKSPACE_files",
212 ],
213 },
214 "io_bazel_skydoc": {
215 "archive": "1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz",
216 "sha256": "5a725b777976b77aa122b707d1b6f0f39b6020f66cd427bb111a585599c857b1",
217 "urls": [
218 "https://mirror.bazel.build/github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz",
219 "https://github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz",
220 ],
221 "used_in": [
222 "additional_distfiles",
223 ],
224 "strip_prefix": "stardoc-1ef781ced3b1443dca3ed05dec1989eca1a4e1cd",
225 },
Tony Aiuto337e7172020-12-09 10:20:14 -0800226 "rules_pkg": {
Tony Aiuto99079b32021-04-06 06:41:17 -0700227 "archive": "rules_pkg-0.4.0.tar.gz",
228 "sha256": "038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d",
Tony Aiuto337e7172020-12-09 10:20:14 -0800229 "urls": [
Tony Aiuto99079b32021-04-06 06:41:17 -0700230 "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz",
231 "https://github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz",
Tony Aiuto337e7172020-12-09 10:20:14 -0800232 ],
Tony Aiutoe973aef2021-01-11 00:32:51 -0800233 "used_in": [
234 "additional_distfiles",
235 ],
Tony Aiuto337e7172020-12-09 10:20:14 -0800236 },
Tony Aiuto1c9e7ca2021-01-05 08:01:21 -0800237 # for Stardoc
238 "io_bazel_rules_sass": {
239 "archive": "1.25.0.zip",
240 "sha256": "c78be58f5e0a29a04686b628cf54faaee0094322ae0ac99da5a8a8afca59a647",
241 "strip_prefix": "rules_sass-1.25.0",
242 "urls": [
243 "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.25.0.zip",
244 "https://github.com/bazelbuild/rules_sass/archive/1.25.0.zip",
245 ],
Tony Aiutoe973aef2021-01-11 00:32:51 -0800246 "used_in": [
247 "additional_distfiles",
248 ],
Tony Aiuto1c9e7ca2021-01-05 08:01:21 -0800249 },
250 # for Stardoc
251 "build_bazel_rules_nodejs": {
252 "archive": "rules_nodejs-2.2.2.tar.gz",
253 "sha256": "f2194102720e662dbf193546585d705e645314319554c6ce7e47d8b59f459e9c",
254 "urls": [
255 "https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/releases/download/2.2.2/rules_nodejs-2.2.2.tar.gz",
256 "https://github.com/bazelbuild/rules_nodejs/releases/download/2.2.2/rules_nodejs-2.2.2.tar.gz",
257 ],
Tony Aiutoe973aef2021-01-11 00:32:51 -0800258 "used_in": [
259 "additional_distfiles",
260 ],
Tony Aiuto1c9e7ca2021-01-05 08:01:21 -0800261 },
mennyf431b0c2021-01-13 09:18:29 -0800262 "desugar_jdk_libs": {
Menny Even Danan29cfb0b2021-03-31 15:21:30 -0700263 # Commit 5847d6a06302136d95a14b4cbd4b55a9c9f1436e of 2021-03-10
264 "archive": "5847d6a06302136d95a14b4cbd4b55a9c9f1436e.zip",
265 "sha256": "299452e6f4a4981b2e6d22357f7332713382a63e4c137f5fd6b89579f6d610cb",
266 "strip_prefix": "desugar_jdk_libs-5847d6a06302136d95a14b4cbd4b55a9c9f1436e",
mennyf431b0c2021-01-13 09:18:29 -0800267 "urls": [
Menny Even Danan29cfb0b2021-03-31 15:21:30 -0700268 "https://mirror.bazel.build/github.com/google/desugar_jdk_libs/archive/5847d6a06302136d95a14b4cbd4b55a9c9f1436e.zip",
269 "https://github.com/google/desugar_jdk_libs/archive/5847d6a06302136d95a14b4cbd4b55a9c9f1436e.zip",
mennyf431b0c2021-01-13 09:18:29 -0800270 ],
271 "used_in": [
272 "additional_distfiles",
273 ],
274 },
aiutobbeb1da2021-01-15 06:50:56 -0800275 "remote_coverage_tools": {
276 "archive": "coverage_output_generator-v2.5.zip",
277 "sha256": "cd14f1cb4559e4723e63b7e7b06d09fcc3bd7ba58d03f354cdff1439bd936a7d",
278 "urls": [
279 "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.5.zip",
280 ],
281 "used_in": [
282 "additional_distfiles",
283 "test_WORKSPACE_files",
284 ],
285 },
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800286 "remote_java_tools": {
John Cater2cff2ac2021-02-26 07:38:37 -0800287 "aliases": [
288 "remote_java_tools_test",
289 "remote_java_tools_for_testing",
290 ],
hvadehrad703b7b2021-11-18 12:24:25 -0800291 "archive": "java_tools-v11.6.zip",
292 "sha256": "a7ac5922ee01e8b8fcb546ffc264ef314d0a0c679328b7fa4c432e5f54a86067",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800293 "urls": [
hvadehrad703b7b2021-11-18 12:24:25 -0800294 "https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools-v11.6.zip",
295 "https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools-v11.6.zip",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800296 ],
297 "used_in": [
298 "additional_distfiles",
299 "test_WORKSPACE_files",
300 ],
301 },
302 "remote_java_tools_linux": {
John Cater2cff2ac2021-02-26 07:38:37 -0800303 "aliases": [
304 "remote_java_tools_test_linux",
305 "remote_java_tools_linux_for_testing",
306 ],
hvadehrad703b7b2021-11-18 12:24:25 -0800307 "archive": "java_tools_linux-v11.6.zip",
308 "sha256": "15da4f84a7d39cd179acf3035d9def638eea6ba89a0ed8f4e8a8e6e1d6c8e328",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800309 "urls": [
hvadehrad703b7b2021-11-18 12:24:25 -0800310 "https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools_linux-v11.6.zip",
311 "https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools_linux-v11.6.zip",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800312 ],
313 "used_in": [
314 "additional_distfiles",
315 "test_WORKSPACE_files",
316 ],
317 },
318 "remote_java_tools_windows": {
John Cater2cff2ac2021-02-26 07:38:37 -0800319 "aliases": [
320 "remote_java_tools_test_windows",
321 "remote_java_tools_windows_for_testing",
322 ],
hvadehrad703b7b2021-11-18 12:24:25 -0800323 "archive": "java_tools_windows-v11.6.zip",
324 "sha256": "939f9d91f0df02851bbad8f5b1d26d24011329394cafe5668c1234e31ac2a1f7",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800325 "urls": [
hvadehrad703b7b2021-11-18 12:24:25 -0800326 "https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools_windows-v11.6.zip",
327 "https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools_windows-v11.6.zip",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800328 ],
329 "used_in": [
330 "additional_distfiles",
331 "test_WORKSPACE_files",
332 ],
333 },
334 "remote_java_tools_darwin": {
John Cater2cff2ac2021-02-26 07:38:37 -0800335 "aliases": [
336 "remote_java_tools_test_darwin",
337 "remote_java_tools_darwin_for_testing",
338 ],
hvadehrad703b7b2021-11-18 12:24:25 -0800339 "archive": "java_tools_darwin-v11.6.zip",
340 "sha256": "f17ee54582b61f1ebd84c8fa2c54df796914cfbaac3cb821fb1286b55b080bc0",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800341 "urls": [
hvadehrad703b7b2021-11-18 12:24:25 -0800342 "https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools_darwin-v11.6.zip",
343 "https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools_darwin-v11.6.zip",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800344 ],
345 "used_in": [
346 "additional_distfiles",
347 "test_WORKSPACE_files",
348 ],
349 },
Ivo Listb7411162022-01-14 09:53:01 -0800350 "remotejdk11_linux": {
351 "aliases": [
352 "remotejdk11_linux_for_testing",
353 "openjdk11_linux_archive",
cushon095f1e22022-02-08 10:54:53 -0800354 "openjdk_linux_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800355 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800356 "archive": "zulu11.52.13-ca-jdk11.0.13-linux_x64.tar.gz",
357 "sha256": "77a126669b26b3a89e0117b0f28cddfcd24fcd7699b2c1d35f921487148b9a9f",
358 "strip_prefix": "zulu11.52.13-ca-jdk11.0.13-linux_x64",
Ivo Listb7411162022-01-14 09:53:01 -0800359 "urls": [
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800360 "https://mirror.bazel.build/zulu/bin/zulu11.52.13-ca-jdk11.0.13-linux_x64.tar.gz",
361 "https://cdn.azul.com/zulu/bin/zulu11.52.13-ca-jdk11.0.13-linux_x64.tar.gz",
Ivo Listb7411162022-01-14 09:53:01 -0800362 ],
363 "used_in": ["test_WORKSPACE_files"],
364 },
365 "remotejdk11_linux_aarch64": {
366 "aliases": [
367 "remotejdk11_linux_aarch64_for_testing",
cushon095f1e22022-02-08 10:54:53 -0800368 "openjdk_linux_aarch64_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800369 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800370 "archive": "zulu11.52.13-ca-jdk11.0.13-linux_aarch64.tar.gz",
371 "sha256": "6be187379c26506a4b804b4f734c17e554aebe4204bde58a10b429054cc9cf9f",
372 "strip_prefix": "zulu11.52.13-ca-jdk11.0.13-linux_aarch64",
373 "urls": [
374 "https://mirror.bazel.build/zulu-embedded/bin/zulu11.52.13-ca-jdk11.0.13-linux_aarch64.tar.gz",
375 "https://cdn.azul.com/zulu-embedded/bin/zulu11.52.13-ca-jdk11.0.13-linux_aarch64.tar.gz",
376 ],
Ivo Listb7411162022-01-14 09:53:01 -0800377 "used_in": ["test_WORKSPACE_files"],
378 },
379 "remotejdk11_linux_ppc64le": {
380 "aliases": [
381 "remotejdk11_linux_ppc64le_for_testing",
cushon095f1e22022-02-08 10:54:53 -0800382 "openjdk_linux_ppc64le_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800383 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800384 "sha256": "82f14cda71cff99c878bf8400598a87235adb6c81b0337f7077c27e5cac1190c",
385 "strip_prefix": "jdk-11.0.13+8",
Ivo Listb7411162022-01-14 09:53:01 -0800386 "urls": [
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800387 "https://mirror.bazel.build/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13+8/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.13_8.tar.gz",
388 "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13+8/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.13_8.tar.gz",
Ivo Listb7411162022-01-14 09:53:01 -0800389 ],
390 "used_in": [],
391 },
392 "remotejdk11_linux_s390x": {
393 "aliases": [
394 "remotejdk11_linux_s390x_for_testing",
cushon095f1e22022-02-08 10:54:53 -0800395 "openjdk_linux_s390x_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800396 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800397 "sha256": "9d280d86fdf6a7d9e5cbf54dc37f1d6d09dfe676ff5c684802fdfa3932eee63e",
398 "strip_prefix": "jdk-11.0.13+8",
Ivo Listb7411162022-01-14 09:53:01 -0800399 "urls": [
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800400 "https://mirror.bazel.build/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13+8/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.13_8.tar.gz",
401 "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13+8/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.13_8.tar.gz",
Ivo Listb7411162022-01-14 09:53:01 -0800402 ],
403 "used_in": [],
404 },
405 "remotejdk11_macos": {
406 "aliases": [
407 "remotejdk11_macos_for_testing",
cushon095f1e22022-02-08 10:54:53 -0800408 "openjdk_macos_x86_64_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800409 "openjdk11_darwin_archive",
410 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800411 "archive": "zulu11.52.13-ca-jdk11.0.13-macosx_x64.tar.gz",
412 "sha256": "e27a11a6e970ba6f597ecc957c0cdb502ff8990c243a6abd9df1e3413a0a3e44",
413 "strip_prefix": "zulu11.52.13-ca-jdk11.0.13-macosx_x64",
414 "urls": [
415 "https://mirror.bazel.build/zulu/bin/zulu11.52.13-ca-jdk11.0.13-macosx_x64.tar.gz",
416 "https://cdn.azul.com/zulu/bin/zulu11.52.13-ca-jdk11.0.13-macosx_x64.tar.gz",
417 ],
Ivo Listb7411162022-01-14 09:53:01 -0800418 "used_in": ["test_WORKSPACE_files"],
419 },
420 "remotejdk11_macos_aarch64": {
421 "aliases": [
cushon095f1e22022-02-08 10:54:53 -0800422 "openjdk_macos_aarch64_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800423 "remotejdk11_macos_aarch64_for_testing",
424 "openjdk11_darwin_aarch64_archive",
425 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800426 "archive": "zulu11.52.13-ca-jdk11.0.13-macosx_aarch64.tar.gz",
427 "sha256": "eb8d593a61a9461a554e7bb1d67bca0f94242273f1d01a13f58c20c269b35fe5",
428 "strip_prefix": "zulu11.52.13-ca-jdk11.0.13-macosx_aarch64",
Ivo Listb7411162022-01-14 09:53:01 -0800429 "urls": [
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800430 "https://mirror.bazel.build/zulu/bin/zulu11.52.13-ca-jdk11.0.13-macosx_aarch64.tar.gz",
431 "https://cdn.azul.com/zulu/bin/zulu11.52.13-ca-jdk11.0.13-macosx_aarch64.tar.gz",
Ivo Listb7411162022-01-14 09:53:01 -0800432 ],
433 "used_in": ["test_WORKSPACE_files"],
434 },
435 "remotejdk11_win": {
436 "aliases": [
437 "remotejdk11_win_for_testing",
438 "openjdk11_windows_archive",
cushon095f1e22022-02-08 10:54:53 -0800439 "openjdk_win_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800440 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800441 "archive": "zulu11.52.13-ca-jdk11.0.13-win_x64.zip",
442 "sha256": "49289cc181504a01c946d5a66a5c904f8e6d912a2226dd82db62eb37e6c0a9d9",
443 "strip_prefix": "zulu11.52.13-ca-jdk11.0.13-win_x64",
444 "urls": [
445 "https://mirror.bazel.build/zulu/bin/zulu11.52.13-ca-jdk11.0.13-win_x64.zip",
446 "https://cdn.azul.com/zulu/bin/zulu11.52.13-ca-jdk11.0.13-win_x64.zip",
447 ],
Ivo Listb7411162022-01-14 09:53:01 -0800448 "used_in": ["test_WORKSPACE_files"],
449 },
cushon095f1e22022-02-08 10:54:53 -0800450 "remotejdk17_win_arm64": {
451 "aliases": [
Niyas Saitb6024252022-02-10 06:59:31 -0800452 "remotejdk17_win_arm64_for_testing",
453 "openjdk17_windows_arm64_archive",
cushon095f1e22022-02-08 10:54:53 -0800454 "openjdk_win_arm64_vanilla",
455 ],
456 "archive": "zulu17.30.15-ca-jdk17.0.1-win_aarch64.zip",
457 "sha256": "811d7e7591bac4f081dfb00ba6bd15b6fc5969e1f89f0f327ef75147027c3877",
458 "strip_prefix": "zulu17.30.15-ca-jdk17.0.1-win_aarch64",
459 "urls": [
460 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.30.15-ca-jdk17.0.1-win_aarch64.zip",
461 "https://cdn.azul.com/zulu/bin/zulu17.30.15-ca-jdk17.0.1-win_aarch64.zip",
462 ],
463 "used_in": ["test_WORKSPACE_files"],
464 },
Niyas Saitb6024252022-02-10 06:59:31 -0800465 "remotejdk11_win_arm64": {
466 "aliases": [
467 "remotejdk11_win_arm64_for_testing",
468 "openjdk11_windows_arm64_archive",
469 ],
470 "archive": "microsoft-jdk-11.0.13.8.1-windows-aarch64.zip",
471 "sha256": "b8a28e6e767d90acf793ea6f5bed0bb595ba0ba5ebdf8b99f395266161e53ec2",
472 "strip_prefix": "jdk-11.0.13+8",
473 "urls": [
474 "https://mirror.bazel.build/aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-windows-aarch64.zip",
475 ],
476 "used_in": ["test_WORKSPACE_files"],
477 },
Ivo Listb7411162022-01-14 09:53:01 -0800478 "remotejdk17_linux": {
479 "aliases": [
480 "remotejdk17_linux_for_testing",
481 "openjdk17_linux_archive",
482 ],
David Ostrovskyfbb09582022-02-08 08:00:11 -0800483 "sha256": "73d5c4bae20325ca41b606f7eae64669db3aac638c5b3ead4a975055846ad6de",
484 "strip_prefix": "zulu17.32.13-ca-jdk17.0.2-linux_x64",
Ivo Listb7411162022-01-14 09:53:01 -0800485 "urls": [
David Ostrovskyfbb09582022-02-08 08:00:11 -0800486 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_x64.tar.gz",
487 "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_x64.tar.gz",
Ivo Listb7411162022-01-14 09:53:01 -0800488 ],
489 "used_in": [],
490 },
491 "remotejdk17_macos": {
492 "aliases": [
493 "remotejdk17_macos_for_testing",
494 "openjdk17_darwin_archive",
495 ],
David Ostrovskyfbb09582022-02-08 08:00:11 -0800496 "sha256": "89d04b2d99b05dcb25114178e65f6a1c5ca742e125cab0a63d87e7e42f3fcb80",
497 "strip_prefix": "zulu17.32.13-ca-jdk17.0.2-macosx_x64",
Ivo Listb7411162022-01-14 09:53:01 -0800498 "urls": [
David Ostrovskyfbb09582022-02-08 08:00:11 -0800499 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_x64.tar.gz",
500 "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_x64.tar.gz",
Ivo Listb7411162022-01-14 09:53:01 -0800501 ],
502 "used_in": [],
503 },
504 "remotejdk17_macos_aarch64": {
505 "aliases": [
506 "remotejdk17_macos_aarch64_for_testing",
507 "openjdk17_darwin_aarch64_archive",
508 ],
David Ostrovskyfbb09582022-02-08 08:00:11 -0800509 "sha256": "54247dde248ffbcd3c048675504b1c503b81daf2dc0d64a79e353c48d383c977",
510 "strip_prefix": "zulu17.32.13-ca-jdk17.0.2-macosx_aarch64",
Ivo Listb7411162022-01-14 09:53:01 -0800511 "urls": [
David Ostrovskyfbb09582022-02-08 08:00:11 -0800512 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_aarch64.tar.gz",
513 "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_aarch64.tar.gz",
Ivo Listb7411162022-01-14 09:53:01 -0800514 ],
515 "used_in": [],
516 },
517 "remotejdk17_win": {
518 "aliases": [
519 "remotejdk17_win_for_testing",
520 "openjdk17_windows_archive",
521 ],
David Ostrovskyfbb09582022-02-08 08:00:11 -0800522 "sha256": "e965aa0ea7a0661a3446cf8f10ee00684b851f883b803315289f26b4aa907fdb",
523 "strip_prefix": "zulu17.32.13-ca-jdk17.0.2-win_x64",
Ivo Listb7411162022-01-14 09:53:01 -0800524 "urls": [
David Ostrovskyfbb09582022-02-08 08:00:11 -0800525 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-win_x64.zip",
526 "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-win_x64.zip",
Ivo Listb7411162022-01-14 09:53:01 -0800527 ],
528 "used_in": [],
529 },
Tony Aiuto337e7172020-12-09 10:20:14 -0800530}
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800531
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800532# Add aliased names
533DEPS_BY_NAME = {}
534
535def _create_index():
536 for repo_name in DIST_DEPS:
537 repo = DIST_DEPS[repo_name]
538 DEPS_BY_NAME[repo_name] = repo
539 aliases = repo.get("aliases")
540 if aliases:
541 for alias in aliases:
542 DEPS_BY_NAME[alias] = repo
543
544_create_index()
545
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800546def _gen_workspace_stanza_impl(ctx):
547 if ctx.attr.template and (ctx.attr.preamble or ctx.attr.postamble):
548 fail("Can not use template with either preamble or postamble")
Ivo Listb7411162022-01-14 09:53:01 -0800549 if ctx.attr.use_maybe and ctx.attr.repo_clause:
550 fail("Can not use use_maybe with repo_clause")
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800551
Tony Aiutob15a8b42021-01-08 07:42:57 -0800552 if ctx.attr.use_maybe:
553 repo_clause = """
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800554maybe(
555 http_archive,
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800556 name = "{repo}",
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800557 sha256 = "{sha256}",
558 strip_prefix = {strip_prefix},
559 urls = {urls},
560)
561"""
Ivo Listb7411162022-01-14 09:53:01 -0800562 elif ctx.attr.repo_clause:
563 repo_clause = ctx.attr.repo_clause
Tony Aiutob15a8b42021-01-08 07:42:57 -0800564 else:
565 repo_clause = """
566http_archive(
567 name = "{repo}",
568 sha256 = "{sha256}",
569 strip_prefix = {strip_prefix},
570 urls = {urls},
571)
572"""
573
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800574 repo_stanzas = {}
575 for repo in ctx.attr.repos:
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800576 info = DEPS_BY_NAME[repo]
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800577 strip_prefix = info.get("strip_prefix")
578 if strip_prefix:
579 strip_prefix = "\"%s\"" % strip_prefix
580 else:
581 strip_prefix = "None"
582
583 repo_stanzas["{%s}" % repo] = repo_clause.format(
584 repo = repo,
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800585 sha256 = str(info["sha256"]),
586 strip_prefix = strip_prefix,
587 urls = info["urls"],
588 )
589
590 if ctx.attr.template:
591 ctx.actions.expand_template(
592 output = ctx.outputs.out,
593 template = ctx.file.template,
594 substitutions = repo_stanzas,
595 )
596 else:
597 content = "\n".join([p.strip() for p in ctx.attr.preamble.strip().split("\n")])
598 content += "\n"
599 content += "".join(repo_stanzas.values())
600 content += "\n"
601 content += "\n".join([p.strip() for p in ctx.attr.postamble.strip().split("\n")])
602 content += "\n"
603 ctx.actions.write(ctx.outputs.out, content)
604
605 return [DefaultInfo(files = depset([ctx.outputs.out]))]
606
607gen_workspace_stanza = rule(
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800608 attrs = {
twerth69a0d1a2021-08-12 07:03:10 -0700609 "repos": attr.string_list(doc = "Set of repos to include."),
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800610 "out": attr.output(mandatory = True),
611 "preamble": attr.string(doc = "Preamble."),
twerth69a0d1a2021-08-12 07:03:10 -0700612 "postamble": attr.string(doc = "Set of rules to follow repos."),
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800613 "template": attr.label(
twerth69a0d1a2021-08-12 07:03:10 -0700614 doc = "Template WORKSPACE file. May not be used with preamble or postamble." +
615 "Repo stanzas can be included using the syntax '{repo name}'.",
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800616 allow_single_file = True,
617 mandatory = False,
618 ),
twerth69a0d1a2021-08-12 07:03:10 -0700619 "use_maybe": attr.bool(doc = "Use maybe() invocation instead of http_archive."),
Ivo Listb7411162022-01-14 09:53:01 -0800620 "repo_clause": attr.string(doc = "Use a custom clause for each repository."),
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800621 },
John Cater2cff2ac2021-02-26 07:38:37 -0800622 doc = "Use specifications from DIST_DEPS to generate WORKSPACE http_archive stanzas or to" +
623 "drop them into a template.",
624 implementation = _gen_workspace_stanza_impl,
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800625)