blob: 2ffd17f52892bb5ed01a18e7081698a00f936286 [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 },
Yun Pengb47aa712022-04-05 04:21:29 -0700170 "com_google_absl": {
171 "archive": "20211102.0.tar.gz",
172 "sha256": "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4",
Tony Aiutoe973aef2021-01-11 00:32:51 -0800173 "urls": [
Yun Pengb47aa712022-04-05 04:21:29 -0700174 "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz",
175 "https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz",
Tony Aiutoe973aef2021-01-11 00:32:51 -0800176 ],
177 "used_in": [
178 "additional_distfiles",
179 "test_WORKSPACE_files",
180 ],
Yun Pengb47aa712022-04-05 04:21:29 -0700181 "strip_prefix": "abseil-cpp-20211102.0",
Tony Aiutoe973aef2021-01-11 00:32:51 -0800182 },
Alessandro Patti6da80862021-11-11 22:49:37 -0800183 "zstd-jni": {
184 "archive": "v1.5.0-4.zip",
185 "patch_args": ["-p1"],
186 "patches": [
187 "//third_party:zstd-jni/Native.java.patch",
188 ],
189 "sha256": "d320d59b89a163c5efccbe4915ae6a49883ce653cdc670643dfa21c6063108e4",
190 "urls": [
191 "https://mirror.bazel.build/github.com/luben/zstd-jni/archive/v1.5.0-4.zip",
192 "https://github.com/luben/zstd-jni/archive/v1.5.0-4.zip",
193 ],
194 "used_in": [
195 "additional_distfiles",
196 ],
197 },
Tony Aiutoe973aef2021-01-11 00:32:51 -0800198 ###################################################
199 #
200 # Build time dependencies for testing and packaging
201 #
202 ###################################################
Tony Aiuto2b7ec5c2021-01-11 07:50:26 -0800203 "bazel_skylib": {
204 "archive": "bazel-skylib-1.0.3.tar.gz",
205 "sha256": "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
206 "urls": [
207 "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
208 "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
209 ],
210 "used_in": [
211 "additional_distfiles",
212 "test_WORKSPACE_files",
213 ],
214 },
215 "io_bazel_skydoc": {
216 "archive": "1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz",
217 "sha256": "5a725b777976b77aa122b707d1b6f0f39b6020f66cd427bb111a585599c857b1",
218 "urls": [
219 "https://mirror.bazel.build/github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz",
220 "https://github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz",
221 ],
222 "used_in": [
223 "additional_distfiles",
224 ],
225 "strip_prefix": "stardoc-1ef781ced3b1443dca3ed05dec1989eca1a4e1cd",
226 },
Tony Aiuto337e7172020-12-09 10:20:14 -0800227 "rules_pkg": {
Tony Aiuto99079b32021-04-06 06:41:17 -0700228 "archive": "rules_pkg-0.4.0.tar.gz",
229 "sha256": "038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d",
Tony Aiuto337e7172020-12-09 10:20:14 -0800230 "urls": [
Tony Aiuto99079b32021-04-06 06:41:17 -0700231 "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz",
232 "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 -0800233 ],
Tony Aiutoe973aef2021-01-11 00:32:51 -0800234 "used_in": [
235 "additional_distfiles",
236 ],
Tony Aiuto337e7172020-12-09 10:20:14 -0800237 },
Tony Aiuto1c9e7ca2021-01-05 08:01:21 -0800238 # for Stardoc
239 "io_bazel_rules_sass": {
240 "archive": "1.25.0.zip",
241 "sha256": "c78be58f5e0a29a04686b628cf54faaee0094322ae0ac99da5a8a8afca59a647",
242 "strip_prefix": "rules_sass-1.25.0",
243 "urls": [
244 "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.25.0.zip",
245 "https://github.com/bazelbuild/rules_sass/archive/1.25.0.zip",
246 ],
Tony Aiutoe973aef2021-01-11 00:32:51 -0800247 "used_in": [
248 "additional_distfiles",
249 ],
Tony Aiuto1c9e7ca2021-01-05 08:01:21 -0800250 },
251 # for Stardoc
252 "build_bazel_rules_nodejs": {
253 "archive": "rules_nodejs-2.2.2.tar.gz",
254 "sha256": "f2194102720e662dbf193546585d705e645314319554c6ce7e47d8b59f459e9c",
255 "urls": [
256 "https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/releases/download/2.2.2/rules_nodejs-2.2.2.tar.gz",
257 "https://github.com/bazelbuild/rules_nodejs/releases/download/2.2.2/rules_nodejs-2.2.2.tar.gz",
258 ],
Tony Aiutoe973aef2021-01-11 00:32:51 -0800259 "used_in": [
260 "additional_distfiles",
261 ],
Tony Aiuto1c9e7ca2021-01-05 08:01:21 -0800262 },
mennyf431b0c2021-01-13 09:18:29 -0800263 "desugar_jdk_libs": {
Menny Even Danan29cfb0b2021-03-31 15:21:30 -0700264 # Commit 5847d6a06302136d95a14b4cbd4b55a9c9f1436e of 2021-03-10
265 "archive": "5847d6a06302136d95a14b4cbd4b55a9c9f1436e.zip",
266 "sha256": "299452e6f4a4981b2e6d22357f7332713382a63e4c137f5fd6b89579f6d610cb",
267 "strip_prefix": "desugar_jdk_libs-5847d6a06302136d95a14b4cbd4b55a9c9f1436e",
mennyf431b0c2021-01-13 09:18:29 -0800268 "urls": [
Menny Even Danan29cfb0b2021-03-31 15:21:30 -0700269 "https://mirror.bazel.build/github.com/google/desugar_jdk_libs/archive/5847d6a06302136d95a14b4cbd4b55a9c9f1436e.zip",
270 "https://github.com/google/desugar_jdk_libs/archive/5847d6a06302136d95a14b4cbd4b55a9c9f1436e.zip",
mennyf431b0c2021-01-13 09:18:29 -0800271 ],
272 "used_in": [
273 "additional_distfiles",
274 ],
275 },
aiutobbeb1da2021-01-15 06:50:56 -0800276 "remote_coverage_tools": {
277 "archive": "coverage_output_generator-v2.5.zip",
278 "sha256": "cd14f1cb4559e4723e63b7e7b06d09fcc3bd7ba58d03f354cdff1439bd936a7d",
279 "urls": [
280 "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.5.zip",
281 ],
282 "used_in": [
283 "additional_distfiles",
284 "test_WORKSPACE_files",
285 ],
286 },
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800287 "remote_java_tools": {
John Cater2cff2ac2021-02-26 07:38:37 -0800288 "aliases": [
289 "remote_java_tools_test",
290 "remote_java_tools_for_testing",
291 ],
hvadehrad703b7b2021-11-18 12:24:25 -0800292 "archive": "java_tools-v11.6.zip",
293 "sha256": "a7ac5922ee01e8b8fcb546ffc264ef314d0a0c679328b7fa4c432e5f54a86067",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800294 "urls": [
hvadehrad703b7b2021-11-18 12:24:25 -0800295 "https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools-v11.6.zip",
296 "https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools-v11.6.zip",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800297 ],
298 "used_in": [
299 "additional_distfiles",
300 "test_WORKSPACE_files",
301 ],
302 },
303 "remote_java_tools_linux": {
John Cater2cff2ac2021-02-26 07:38:37 -0800304 "aliases": [
305 "remote_java_tools_test_linux",
306 "remote_java_tools_linux_for_testing",
307 ],
hvadehrad703b7b2021-11-18 12:24:25 -0800308 "archive": "java_tools_linux-v11.6.zip",
309 "sha256": "15da4f84a7d39cd179acf3035d9def638eea6ba89a0ed8f4e8a8e6e1d6c8e328",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800310 "urls": [
hvadehrad703b7b2021-11-18 12:24:25 -0800311 "https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools_linux-v11.6.zip",
312 "https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools_linux-v11.6.zip",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800313 ],
314 "used_in": [
315 "additional_distfiles",
316 "test_WORKSPACE_files",
317 ],
318 },
319 "remote_java_tools_windows": {
John Cater2cff2ac2021-02-26 07:38:37 -0800320 "aliases": [
321 "remote_java_tools_test_windows",
322 "remote_java_tools_windows_for_testing",
323 ],
hvadehrad703b7b2021-11-18 12:24:25 -0800324 "archive": "java_tools_windows-v11.6.zip",
325 "sha256": "939f9d91f0df02851bbad8f5b1d26d24011329394cafe5668c1234e31ac2a1f7",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800326 "urls": [
hvadehrad703b7b2021-11-18 12:24:25 -0800327 "https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools_windows-v11.6.zip",
328 "https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools_windows-v11.6.zip",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800329 ],
330 "used_in": [
331 "additional_distfiles",
332 "test_WORKSPACE_files",
333 ],
334 },
335 "remote_java_tools_darwin": {
John Cater2cff2ac2021-02-26 07:38:37 -0800336 "aliases": [
337 "remote_java_tools_test_darwin",
338 "remote_java_tools_darwin_for_testing",
339 ],
hvadehrad703b7b2021-11-18 12:24:25 -0800340 "archive": "java_tools_darwin-v11.6.zip",
341 "sha256": "f17ee54582b61f1ebd84c8fa2c54df796914cfbaac3cb821fb1286b55b080bc0",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800342 "urls": [
hvadehrad703b7b2021-11-18 12:24:25 -0800343 "https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools_darwin-v11.6.zip",
344 "https://github.com/bazelbuild/java_tools/releases/download/java_v11.6/java_tools_darwin-v11.6.zip",
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800345 ],
346 "used_in": [
347 "additional_distfiles",
348 "test_WORKSPACE_files",
349 ],
350 },
Ivo Listb7411162022-01-14 09:53:01 -0800351 "remotejdk11_linux": {
352 "aliases": [
353 "remotejdk11_linux_for_testing",
354 "openjdk11_linux_archive",
cushon095f1e22022-02-08 10:54:53 -0800355 "openjdk_linux_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800356 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800357 "archive": "zulu11.52.13-ca-jdk11.0.13-linux_x64.tar.gz",
358 "sha256": "77a126669b26b3a89e0117b0f28cddfcd24fcd7699b2c1d35f921487148b9a9f",
359 "strip_prefix": "zulu11.52.13-ca-jdk11.0.13-linux_x64",
Ivo Listb7411162022-01-14 09:53:01 -0800360 "urls": [
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800361 "https://mirror.bazel.build/zulu/bin/zulu11.52.13-ca-jdk11.0.13-linux_x64.tar.gz",
362 "https://cdn.azul.com/zulu/bin/zulu11.52.13-ca-jdk11.0.13-linux_x64.tar.gz",
Ivo Listb7411162022-01-14 09:53:01 -0800363 ],
364 "used_in": ["test_WORKSPACE_files"],
365 },
366 "remotejdk11_linux_aarch64": {
367 "aliases": [
368 "remotejdk11_linux_aarch64_for_testing",
cushon095f1e22022-02-08 10:54:53 -0800369 "openjdk_linux_aarch64_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800370 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800371 "archive": "zulu11.52.13-ca-jdk11.0.13-linux_aarch64.tar.gz",
372 "sha256": "6be187379c26506a4b804b4f734c17e554aebe4204bde58a10b429054cc9cf9f",
373 "strip_prefix": "zulu11.52.13-ca-jdk11.0.13-linux_aarch64",
374 "urls": [
375 "https://mirror.bazel.build/zulu-embedded/bin/zulu11.52.13-ca-jdk11.0.13-linux_aarch64.tar.gz",
376 "https://cdn.azul.com/zulu-embedded/bin/zulu11.52.13-ca-jdk11.0.13-linux_aarch64.tar.gz",
377 ],
Ivo Listb7411162022-01-14 09:53:01 -0800378 "used_in": ["test_WORKSPACE_files"],
379 },
380 "remotejdk11_linux_ppc64le": {
381 "aliases": [
382 "remotejdk11_linux_ppc64le_for_testing",
cushon095f1e22022-02-08 10:54:53 -0800383 "openjdk_linux_ppc64le_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800384 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800385 "sha256": "82f14cda71cff99c878bf8400598a87235adb6c81b0337f7077c27e5cac1190c",
386 "strip_prefix": "jdk-11.0.13+8",
Ivo Listb7411162022-01-14 09:53:01 -0800387 "urls": [
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800388 "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",
389 "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 -0800390 ],
391 "used_in": [],
392 },
393 "remotejdk11_linux_s390x": {
394 "aliases": [
395 "remotejdk11_linux_s390x_for_testing",
cushon095f1e22022-02-08 10:54:53 -0800396 "openjdk_linux_s390x_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800397 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800398 "sha256": "9d280d86fdf6a7d9e5cbf54dc37f1d6d09dfe676ff5c684802fdfa3932eee63e",
399 "strip_prefix": "jdk-11.0.13+8",
Ivo Listb7411162022-01-14 09:53:01 -0800400 "urls": [
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800401 "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",
402 "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 -0800403 ],
404 "used_in": [],
405 },
406 "remotejdk11_macos": {
407 "aliases": [
408 "remotejdk11_macos_for_testing",
cushon095f1e22022-02-08 10:54:53 -0800409 "openjdk_macos_x86_64_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800410 "openjdk11_darwin_archive",
411 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800412 "archive": "zulu11.52.13-ca-jdk11.0.13-macosx_x64.tar.gz",
413 "sha256": "e27a11a6e970ba6f597ecc957c0cdb502ff8990c243a6abd9df1e3413a0a3e44",
414 "strip_prefix": "zulu11.52.13-ca-jdk11.0.13-macosx_x64",
415 "urls": [
416 "https://mirror.bazel.build/zulu/bin/zulu11.52.13-ca-jdk11.0.13-macosx_x64.tar.gz",
417 "https://cdn.azul.com/zulu/bin/zulu11.52.13-ca-jdk11.0.13-macosx_x64.tar.gz",
418 ],
Ivo Listb7411162022-01-14 09:53:01 -0800419 "used_in": ["test_WORKSPACE_files"],
420 },
421 "remotejdk11_macos_aarch64": {
422 "aliases": [
cushon095f1e22022-02-08 10:54:53 -0800423 "openjdk_macos_aarch64_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800424 "remotejdk11_macos_aarch64_for_testing",
425 "openjdk11_darwin_aarch64_archive",
426 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800427 "archive": "zulu11.52.13-ca-jdk11.0.13-macosx_aarch64.tar.gz",
428 "sha256": "eb8d593a61a9461a554e7bb1d67bca0f94242273f1d01a13f58c20c269b35fe5",
429 "strip_prefix": "zulu11.52.13-ca-jdk11.0.13-macosx_aarch64",
Ivo Listb7411162022-01-14 09:53:01 -0800430 "urls": [
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800431 "https://mirror.bazel.build/zulu/bin/zulu11.52.13-ca-jdk11.0.13-macosx_aarch64.tar.gz",
432 "https://cdn.azul.com/zulu/bin/zulu11.52.13-ca-jdk11.0.13-macosx_aarch64.tar.gz",
Ivo Listb7411162022-01-14 09:53:01 -0800433 ],
434 "used_in": ["test_WORKSPACE_files"],
435 },
436 "remotejdk11_win": {
437 "aliases": [
438 "remotejdk11_win_for_testing",
439 "openjdk11_windows_archive",
cushon095f1e22022-02-08 10:54:53 -0800440 "openjdk_win_vanilla",
Ivo Listb7411162022-01-14 09:53:01 -0800441 ],
Liam Miller-Cushon7de15712022-01-25 11:34:44 -0800442 "archive": "zulu11.52.13-ca-jdk11.0.13-win_x64.zip",
443 "sha256": "49289cc181504a01c946d5a66a5c904f8e6d912a2226dd82db62eb37e6c0a9d9",
444 "strip_prefix": "zulu11.52.13-ca-jdk11.0.13-win_x64",
445 "urls": [
446 "https://mirror.bazel.build/zulu/bin/zulu11.52.13-ca-jdk11.0.13-win_x64.zip",
447 "https://cdn.azul.com/zulu/bin/zulu11.52.13-ca-jdk11.0.13-win_x64.zip",
448 ],
Ivo Listb7411162022-01-14 09:53:01 -0800449 "used_in": ["test_WORKSPACE_files"],
450 },
cushon095f1e22022-02-08 10:54:53 -0800451 "remotejdk17_win_arm64": {
452 "aliases": [
Niyas Saitb6024252022-02-10 06:59:31 -0800453 "remotejdk17_win_arm64_for_testing",
454 "openjdk17_windows_arm64_archive",
cushon095f1e22022-02-08 10:54:53 -0800455 "openjdk_win_arm64_vanilla",
456 ],
457 "archive": "zulu17.30.15-ca-jdk17.0.1-win_aarch64.zip",
458 "sha256": "811d7e7591bac4f081dfb00ba6bd15b6fc5969e1f89f0f327ef75147027c3877",
459 "strip_prefix": "zulu17.30.15-ca-jdk17.0.1-win_aarch64",
460 "urls": [
461 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.30.15-ca-jdk17.0.1-win_aarch64.zip",
462 "https://cdn.azul.com/zulu/bin/zulu17.30.15-ca-jdk17.0.1-win_aarch64.zip",
463 ],
464 "used_in": ["test_WORKSPACE_files"],
465 },
Niyas Saitb6024252022-02-10 06:59:31 -0800466 "remotejdk11_win_arm64": {
467 "aliases": [
468 "remotejdk11_win_arm64_for_testing",
469 "openjdk11_windows_arm64_archive",
470 ],
471 "archive": "microsoft-jdk-11.0.13.8.1-windows-aarch64.zip",
472 "sha256": "b8a28e6e767d90acf793ea6f5bed0bb595ba0ba5ebdf8b99f395266161e53ec2",
473 "strip_prefix": "jdk-11.0.13+8",
474 "urls": [
475 "https://mirror.bazel.build/aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-windows-aarch64.zip",
476 ],
477 "used_in": ["test_WORKSPACE_files"],
478 },
Ivo Listb7411162022-01-14 09:53:01 -0800479 "remotejdk17_linux": {
480 "aliases": [
481 "remotejdk17_linux_for_testing",
482 "openjdk17_linux_archive",
483 ],
David Ostrovskyfbb09582022-02-08 08:00:11 -0800484 "sha256": "73d5c4bae20325ca41b606f7eae64669db3aac638c5b3ead4a975055846ad6de",
485 "strip_prefix": "zulu17.32.13-ca-jdk17.0.2-linux_x64",
Ivo Listb7411162022-01-14 09:53:01 -0800486 "urls": [
David Ostrovskyfbb09582022-02-08 08:00:11 -0800487 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_x64.tar.gz",
488 "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_x64.tar.gz",
Ivo Listb7411162022-01-14 09:53:01 -0800489 ],
490 "used_in": [],
491 },
492 "remotejdk17_macos": {
493 "aliases": [
494 "remotejdk17_macos_for_testing",
495 "openjdk17_darwin_archive",
496 ],
David Ostrovskyfbb09582022-02-08 08:00:11 -0800497 "sha256": "89d04b2d99b05dcb25114178e65f6a1c5ca742e125cab0a63d87e7e42f3fcb80",
498 "strip_prefix": "zulu17.32.13-ca-jdk17.0.2-macosx_x64",
Ivo Listb7411162022-01-14 09:53:01 -0800499 "urls": [
David Ostrovskyfbb09582022-02-08 08:00:11 -0800500 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_x64.tar.gz",
501 "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_x64.tar.gz",
Ivo Listb7411162022-01-14 09:53:01 -0800502 ],
503 "used_in": [],
504 },
505 "remotejdk17_macos_aarch64": {
506 "aliases": [
507 "remotejdk17_macos_aarch64_for_testing",
508 "openjdk17_darwin_aarch64_archive",
509 ],
David Ostrovskyfbb09582022-02-08 08:00:11 -0800510 "sha256": "54247dde248ffbcd3c048675504b1c503b81daf2dc0d64a79e353c48d383c977",
511 "strip_prefix": "zulu17.32.13-ca-jdk17.0.2-macosx_aarch64",
Ivo Listb7411162022-01-14 09:53:01 -0800512 "urls": [
David Ostrovskyfbb09582022-02-08 08:00:11 -0800513 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_aarch64.tar.gz",
514 "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_aarch64.tar.gz",
Ivo Listb7411162022-01-14 09:53:01 -0800515 ],
516 "used_in": [],
517 },
518 "remotejdk17_win": {
519 "aliases": [
520 "remotejdk17_win_for_testing",
521 "openjdk17_windows_archive",
522 ],
David Ostrovskyfbb09582022-02-08 08:00:11 -0800523 "sha256": "e965aa0ea7a0661a3446cf8f10ee00684b851f883b803315289f26b4aa907fdb",
524 "strip_prefix": "zulu17.32.13-ca-jdk17.0.2-win_x64",
Ivo Listb7411162022-01-14 09:53:01 -0800525 "urls": [
David Ostrovskyfbb09582022-02-08 08:00:11 -0800526 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-win_x64.zip",
527 "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-win_x64.zip",
Ivo Listb7411162022-01-14 09:53:01 -0800528 ],
529 "used_in": [],
530 },
Liam Miller-Cushona7f1c712022-03-29 11:57:55 -0700531 "remotejdk18_linux": {
532 "aliases": [
533 "remotejdk18_linux_for_testing",
534 "openjdk18_linux_archive",
535 ],
536 "sha256": "959a94ca4097dcaabc7886784cec10dfdf2b0a3bff890ea8943cc09c5fff29cb",
537 "strip_prefix": "zulu18.28.13-ca-jdk18.0.0-linux_x64",
538 "urls": [
539 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu18.28.13-ca-jdk18.0.0-linux_x64.tar.gz",
540 "https://cdn.azul.com/zulu/bin/zulu18.28.13-ca-jdk18.0.0-linux_x64.tar.gz",
541 ],
542 "used_in": [],
543 },
544 "remotejdk18_macos": {
545 "aliases": [
546 "remotejdk18_macos_for_testing",
547 "openjdk18_darwin_archive",
548 ],
549 "sha256": "780a9aa4bda95a6793bf41d13f837c59ef915e9bfd0e0c5fd4c70e4cdaa88541",
550 "strip_prefix": "zulu18.28.13-ca-jdk18.0.0-macosx_x64",
551 "urls": [
552 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu18.28.13-ca-jdk18.0.0-macosx_x64.tar.gz",
553 "https://cdn.azul.com/zulu/bin/zulu18.28.13-ca-jdk18.0.0-macosx_x64.tar.gz",
554 ],
555 "used_in": [],
556 },
557 "remotejdk18_macos_aarch64": {
558 "aliases": [
559 "remotejdk18_macos_aarch64_for_testing",
560 "openjdk18_darwin_aarch64_archive",
561 ],
562 "sha256": "9595e001451e201fdf33c1952777968a3ac18fe37273bdeaea5b5ed2c4950432",
563 "strip_prefix": "zulu18.28.13-ca-jdk18.0.0-macosx_aarch64",
564 "urls": [
565 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu18.28.13-ca-jdk18.0.0-macosx_aarch64.tar.gz",
566 "https://cdn.azul.com/zulu/bin/zulu18.28.13-ca-jdk18.0.0-macosx_aarch64.tar.gz",
567 ],
568 "used_in": [],
569 },
570 "remotejdk18_win": {
571 "aliases": [
572 "remotejdk18_win_for_testing",
573 "openjdk18_windows_archive",
574 ],
575 "sha256": "6c75498163b047595386fdb909cb6d4e04282c3a81799743c5e1f9316391fe16",
576 "strip_prefix": "zulu18.28.13-ca-jdk18.0.0-win_x64",
577 "urls": [
578 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu18.28.13-ca-jdk18.0.0-win_x64.zip",
579 "https://cdn.azul.com/zulu/bin/zulu18.28.13-ca-jdk18.0.0-win_x64.zip",
580 ],
581 "used_in": [],
582 },
583 "remotejdk18_win_arm64": {
584 "aliases": [
585 "remotejdk18_win_arm64_for_testing",
586 "openjdk18_windows_arm64_archive",
587 ],
588 "archive": "zulu18.28.13-ca-jdk18.0.0-win_aarch64.zip",
589 "sha256": "9b52b259516e4140ee56b91f77750667bffbc543e78ad8c39082449d4c377b54",
590 "strip_prefix": "zulu18.28.13-ca-jdk18.0.0-win_aarch64",
591 "urls": [
592 "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu18.28.13-ca-jdk18.0.0-win_aarch64.zip",
593 "https://cdn.azul.com/zulu/bin/zulu18.28.13-ca-jdk18.0.0-win_aarch64.zip",
594 ],
595 "used_in": ["test_WORKSPACE_files"],
596 },
Tony Aiuto337e7172020-12-09 10:20:14 -0800597}
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800598
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800599# Add aliased names
600DEPS_BY_NAME = {}
601
602def _create_index():
603 for repo_name in DIST_DEPS:
604 repo = DIST_DEPS[repo_name]
605 DEPS_BY_NAME[repo_name] = repo
606 aliases = repo.get("aliases")
607 if aliases:
608 for alias in aliases:
609 DEPS_BY_NAME[alias] = repo
610
611_create_index()
612
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800613def _gen_workspace_stanza_impl(ctx):
614 if ctx.attr.template and (ctx.attr.preamble or ctx.attr.postamble):
615 fail("Can not use template with either preamble or postamble")
Ivo Listb7411162022-01-14 09:53:01 -0800616 if ctx.attr.use_maybe and ctx.attr.repo_clause:
617 fail("Can not use use_maybe with repo_clause")
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800618
Tony Aiutob15a8b42021-01-08 07:42:57 -0800619 if ctx.attr.use_maybe:
620 repo_clause = """
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800621maybe(
622 http_archive,
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800623 name = "{repo}",
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800624 sha256 = "{sha256}",
625 strip_prefix = {strip_prefix},
626 urls = {urls},
627)
628"""
Ivo Listb7411162022-01-14 09:53:01 -0800629 elif ctx.attr.repo_clause:
630 repo_clause = ctx.attr.repo_clause
Tony Aiutob15a8b42021-01-08 07:42:57 -0800631 else:
632 repo_clause = """
633http_archive(
634 name = "{repo}",
635 sha256 = "{sha256}",
636 strip_prefix = {strip_prefix},
637 urls = {urls},
638)
639"""
640
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800641 repo_stanzas = {}
642 for repo in ctx.attr.repos:
Tony Aiuto6a3d5f12021-01-12 13:38:32 -0800643 info = DEPS_BY_NAME[repo]
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800644 strip_prefix = info.get("strip_prefix")
645 if strip_prefix:
646 strip_prefix = "\"%s\"" % strip_prefix
647 else:
648 strip_prefix = "None"
649
650 repo_stanzas["{%s}" % repo] = repo_clause.format(
651 repo = repo,
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800652 sha256 = str(info["sha256"]),
653 strip_prefix = strip_prefix,
654 urls = info["urls"],
655 )
656
657 if ctx.attr.template:
658 ctx.actions.expand_template(
659 output = ctx.outputs.out,
660 template = ctx.file.template,
661 substitutions = repo_stanzas,
662 )
663 else:
664 content = "\n".join([p.strip() for p in ctx.attr.preamble.strip().split("\n")])
665 content += "\n"
666 content += "".join(repo_stanzas.values())
667 content += "\n"
668 content += "\n".join([p.strip() for p in ctx.attr.postamble.strip().split("\n")])
669 content += "\n"
670 ctx.actions.write(ctx.outputs.out, content)
671
672 return [DefaultInfo(files = depset([ctx.outputs.out]))]
673
674gen_workspace_stanza = rule(
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800675 attrs = {
twerth69a0d1a2021-08-12 07:03:10 -0700676 "repos": attr.string_list(doc = "Set of repos to include."),
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800677 "out": attr.output(mandatory = True),
678 "preamble": attr.string(doc = "Preamble."),
twerth69a0d1a2021-08-12 07:03:10 -0700679 "postamble": attr.string(doc = "Set of rules to follow repos."),
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800680 "template": attr.label(
twerth69a0d1a2021-08-12 07:03:10 -0700681 doc = "Template WORKSPACE file. May not be used with preamble or postamble." +
682 "Repo stanzas can be included using the syntax '{repo name}'.",
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800683 allow_single_file = True,
684 mandatory = False,
685 ),
twerth69a0d1a2021-08-12 07:03:10 -0700686 "use_maybe": attr.bool(doc = "Use maybe() invocation instead of http_archive."),
Ivo Listb7411162022-01-14 09:53:01 -0800687 "repo_clause": attr.string(doc = "Use a custom clause for each repository."),
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800688 },
John Cater2cff2ac2021-02-26 07:38:37 -0800689 doc = "Use specifications from DIST_DEPS to generate WORKSPACE http_archive stanzas or to" +
690 "drop them into a template.",
691 implementation = _gen_workspace_stanza_impl,
Tony Aiuto3b2d3102021-01-07 03:40:14 -0800692)