blob: ad59314dbd3601a867b31d08d938de9edb38b709 [file] [log] [blame]
Brian Silverman7bda6212018-08-05 11:42:11 -07001workspace(name = "org_frc971")
Brian Silvermand1c19fb2016-07-07 00:10:57 -07002
Philipp Schradercc016b32021-12-30 08:59:58 -08003load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
Austin Schuhf093fa52019-06-23 20:47:23 -07004load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
Philipp Schrader6efe5732022-02-12 15:11:13 -08005load("@bazel_tools//tools/jdk:remote_java_repository.bzl", "remote_java_repository")
Philipp Schrader9670a2a2023-01-11 01:20:16 -08006load("//tools/ci:repo_defs.bzl", "ci_configure")
7
8ci_configure(name = "ci_configure")
9
10load("@ci_configure//:ci.bzl", "RUNNING_IN_CI")
11
12http_archive(
13 name = "platforms",
Austin Schuh8f99c822024-05-05 22:43:40 -070014 sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee",
15 urls = [
16 "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
17 "https://github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
18 ],
Philipp Schrader9670a2a2023-01-11 01:20:16 -080019)
20
21http_archive(
22 name = "bazel_skylib",
Austin Schuhd0f25762024-06-25 21:19:45 -070023 sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
Philipp Schrader9670a2a2023-01-11 01:20:16 -080024 urls = [
Austin Schuhd0f25762024-06-25 21:19:45 -070025 "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
26 "https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
Philipp Schrader9670a2a2023-01-11 01:20:16 -080027 ],
28)
29
Philipp Schrader35bb1532023-03-05 13:49:12 -080030load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
31
32bazel_skylib_workspace()
33
Philipp Schrader9670a2a2023-01-11 01:20:16 -080034http_archive(
Philipp Schrader55dd6b42023-02-22 20:44:23 -080035 name = "aspect_bazel_lib",
Austin Schuh8f99c822024-05-05 22:43:40 -070036 sha256 = "a8a92645e7298bbf538aa880131c6adb4cf6239bbd27230f077a00414d58e4ce",
37 strip_prefix = "bazel-lib-2.7.2",
38 url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.7.2/bazel-lib-v2.7.2.tar.gz",
Philipp Schrader55dd6b42023-02-22 20:44:23 -080039)
40
Philipp Schraderba072d92024-02-21 17:00:37 -080041load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "aspect_bazel_lib_register_toolchains", "register_jq_toolchains")
Philipp Schrader55dd6b42023-02-22 20:44:23 -080042
43aspect_bazel_lib_dependencies()
44
Philipp Schraderba072d92024-02-21 17:00:37 -080045aspect_bazel_lib_register_toolchains()
46
Philipp Schrader175a93c2023-02-19 13:13:40 -080047register_jq_toolchains()
48
Philipp Schrader55dd6b42023-02-22 20:44:23 -080049http_archive(
Philipp Schrader9670a2a2023-01-11 01:20:16 -080050 name = "rules_python",
51 patch_args = ["-p1"],
52 patches = [
53 "//third_party:rules_python/0001-Support-overriding-individual-packages.patch",
54 "//third_party:rules_python/0002-Allow-user-to-patch-wheels.patch",
55 ],
56 sha256 = "497ca47374f48c8b067d786b512ac10a276211810f4a580178ee9b9ad139323a",
57 strip_prefix = "rules_python-0.16.1",
58 url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.16.1.tar.gz",
59)
60
61load("@rules_python//python:repositories.bzl", "python_register_toolchains")
62
63python_register_toolchains(
64 name = "python3_9",
65 python_version = "3.9",
66 register_toolchains = False,
67)
68
James Kuszmaul9776b392023-01-14 14:08:08 -080069load(
70 "@python3_9//:defs.bzl",
71 python_interpreter = "interpreter",
72)
Philipp Schrader9670a2a2023-01-11 01:20:16 -080073load("@rules_python//python:pip.bzl", "pip_parse")
James Kuszmaul9776b392023-01-14 14:08:08 -080074load(
75 "//tools/python:package_annotations.bzl",
76 PYTHON_ANNOTATIONS = "ANNOTATIONS",
77)
Philipp Schrader9670a2a2023-01-11 01:20:16 -080078
79pip_parse(
80 name = "pip_deps",
81 annotations = PYTHON_ANNOTATIONS,
82 enable_implicit_namespace_pkgs = True,
83 overrides = "//tools/python:whl_overrides.json",
84 patch_spec = "//tools/python:patches.json",
85 python_interpreter_target = python_interpreter,
86 require_overrides = RUNNING_IN_CI,
87 requirements_lock = "//tools/python:requirements.lock.txt",
88)
89
90# Load the starlark macro which will define your dependencies.
James Kuszmaul9776b392023-01-14 14:08:08 -080091load(
92 "@pip_deps//:requirements.bzl",
93 install_pip_deps = "install_deps",
94)
Philipp Schrader9670a2a2023-01-11 01:20:16 -080095
96install_pip_deps()
97
98load("//tools/python:repo_defs.bzl", "pip_configure")
99
100pip_configure(
101 name = "pip",
102)
103
104http_archive(
105 name = "rules_pkg",
Austin Schuhd0f25762024-06-25 21:19:45 -0700106 sha256 = "cad05f864a32799f6f9022891de91ac78f30e0fa07dc68abac92a628121b5b11",
Philipp Schrader9670a2a2023-01-11 01:20:16 -0800107 urls = [
Austin Schuhd0f25762024-06-25 21:19:45 -0700108 "https://github.com/bazelbuild/rules_pkg/releases/download/1.0.0/rules_pkg-1.0.0.tar.gz",
Philipp Schrader9670a2a2023-01-11 01:20:16 -0800109 ],
110)
111
112load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
113
114rules_pkg_dependencies()
115
Brian Silverman7bda6212018-08-05 11:42:11 -0700116load(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800117 "//debian:apache2.bzl",
118 apache2_debs = "files",
119)
120load(
Brian Silverman50b9ac02018-08-12 13:24:10 -0700121 "//debian:arm_frc_gnueabi_deps.bzl",
122 arm_frc_gnueabi_deps_debs = "files",
123)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700124load(
Austin Schuh8f99c822024-05-05 22:43:40 -0700125 "//debian:clang_amd64.bzl",
126 clang_amd64_debs = "files",
Brian Silvermand97a47c2020-01-16 00:47:53 -0800127)
Tyler Chatow60671d32020-02-26 19:49:30 -0800128load(
129 "//debian:gstreamer_amd64.bzl",
James Kuszmaulc91e4402020-05-10 18:47:20 -0700130 gstreamer_amd64_debs = "files",
Tyler Chatow60671d32020-02-26 19:49:30 -0800131)
132load(
Austin Schuh8f99c822024-05-05 22:43:40 -0700133 "//debian:gtk_runtime.bzl",
134 gtk_runtime_debs = "files",
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700135)
Tyler Chatow8a51ac62022-03-15 13:23:12 -0700136load(
137 "//debian:libtinfo5_amd64.bzl",
138 libtinfo5_amd64_debs = "files",
139)
Tyler Chatowec100e22022-03-22 16:23:04 -0700140load(
141 "//debian:libtinfo5_arm64.bzl",
142 libtinfo5_arm64_debs = "files",
143)
Philipp Schraderf60e7d72023-02-19 17:07:22 -0800144load(
Austin Schuh8f99c822024-05-05 22:43:40 -0700145 "//debian:libusb.bzl",
146 libusb_debs = "files",
147)
148load(
149 "//debian:lzma_amd64.bzl",
150 lzma_amd64_debs = "files",
151)
152load(
153 "//debian:lzma_arm64.bzl",
154 lzma_arm64_debs = "files",
155)
156load(
157 "//debian:m4.bzl",
158 m4_debs = "files",
159)
160load(
161 "//debian:mingw_compiler.bzl",
162 mingw_compiler_debs = "files",
163)
164load(
165 "//debian:opencv_amd64.bzl",
166 opencv_amd64_debs = "files",
167)
168load("//debian:packages.bzl", "generate_repositories_for_debs")
169load(
170 "//debian:pandoc.bzl",
171 pandoc_debs = "files",
172)
173load(
174 "//debian:patch.bzl",
175 patch_debs = "files",
176)
177load(
178 "//debian:patchelf.bzl",
179 patchelf_debs = "files",
180)
181load(
Maxwell Henderson8108e992024-05-07 22:00:22 -0700182 "//debian:phoenix6.bzl",
183 phoenix6_debs = "files",
184)
185load(
Austin Schuh8f99c822024-05-05 22:43:40 -0700186 "//debian:postgresql_amd64.bzl",
187 postgresql_amd64_debs = "files",
188)
189load(
190 "//debian:rsync.bzl",
191 rsync_debs = "files",
192)
193load(
194 "//debian:ssh.bzl",
195 ssh_debs = "files",
196)
197load(
Philipp Schraderf60e7d72023-02-19 17:07:22 -0800198 "//debian:xvfb_amd64.bzl",
199 xvfb_amd64_debs = "files",
200)
Philipp Schrader0e19c602018-03-07 21:07:22 -0800201
Austin Schuh71f6fa72019-08-31 18:23:02 -0700202generate_repositories_for_debs(rsync_debs)
203
204generate_repositories_for_debs(ssh_debs)
205
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800206generate_repositories_for_debs(apache2_debs)
207
Philipp Schrader41011a12022-03-13 12:49:32 -0700208generate_repositories_for_debs(postgresql_amd64_debs)
209
Brian Silverman7bda6212018-08-05 11:42:11 -0700210generate_repositories_for_debs(patch_debs)
211
Brian Silverman7297c0c2018-08-05 13:43:00 -0700212generate_repositories_for_debs(pandoc_debs)
213
Brian Silverman4f6ba442018-08-05 14:34:58 -0700214generate_repositories_for_debs(libusb_debs)
215
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700216generate_repositories_for_debs(mingw_compiler_debs)
217
Brian Silverman6470f442018-08-05 12:08:16 -0700218generate_repositories_for_debs(patchelf_debs)
219
Brian Silverman50b9ac02018-08-12 13:24:10 -0700220generate_repositories_for_debs(arm_frc_gnueabi_deps_debs)
221
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700222generate_repositories_for_debs(gtk_runtime_debs)
223
Brian Silvermand97a47c2020-01-16 00:47:53 -0800224generate_repositories_for_debs(opencv_amd64_debs)
225
Tyler Chatow6eda82c2022-03-27 22:37:38 -0700226generate_repositories_for_debs(
227 gstreamer_amd64_debs,
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700228 base_url = "https://software.frc971.org/Build-Dependencies/gstreamer_bullseye_amd64_deps",
Tyler Chatow6eda82c2022-03-27 22:37:38 -0700229)
Tyler Chatow60671d32020-02-26 19:49:30 -0800230
Austin Schuh023e7f52020-08-18 21:24:37 -0700231generate_repositories_for_debs(m4_debs)
232
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700233generate_repositories_for_debs(lzma_amd64_debs)
234
235generate_repositories_for_debs(lzma_arm64_debs)
236
Tyler Chatow8a51ac62022-03-15 13:23:12 -0700237generate_repositories_for_debs(libtinfo5_amd64_debs)
238
Tyler Chatowec100e22022-03-22 16:23:04 -0700239generate_repositories_for_debs(libtinfo5_arm64_debs)
240
Philipp Schraderf60e7d72023-02-19 17:07:22 -0800241generate_repositories_for_debs(xvfb_amd64_debs)
242
Austin Schuh94dbdf32024-04-11 22:51:09 -0700243generate_repositories_for_debs(clang_amd64_debs)
244
Maxwell Henderson8108e992024-05-07 22:00:22 -0700245generate_repositories_for_debs(phoenix6_debs)
246
Brian Silvermanc0309a02022-01-01 23:57:03 -0800247local_repository(
248 name = "com_grail_bazel_toolchain",
249 path = "third_party/bazel-toolchain",
250)
251
James Kuszmaulf35eb982023-12-09 17:50:01 -0800252http_archive(
253 name = "RangeHTTPServer",
254 sha256 = "98a8e4980f91d048dc9159cfc5f115280d0b5ec59a5b01df0422b887212fa4f0",
255 strip_prefix = "RangeHTTPServer-9070394508a135789238a33259793f3c6f3c127a",
256 url = "https://github.com/jkuszmaul/RangeHTTPServer/archive/9070394508a135789238a33259793f3c6f3c127a.zip",
257)
258
Brian Silverman4c7235a2021-11-17 19:04:37 -0800259load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm", "llvm_toolchain")
260
Austin Schuh612d95d2023-10-21 00:01:40 -0700261llvm_version = "17.0.2"
Brian Silverman4c7235a2021-11-17 19:04:37 -0800262
263llvm(
264 name = "llvm_k8",
Austin Schuh94dbdf32024-04-11 22:51:09 -0700265 distribution = "clang+llvm-%s-x86_64-linux-gnu-ubuntu-22.04.tar.zst" % llvm_version,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800266 llvm_version = llvm_version,
267)
268
269llvm(
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800270 name = "llvm_aarch64",
271 distribution = "clang+llvm-%s-aarch64-linux-gnu.tar.xz" % llvm_version,
272 llvm_version = llvm_version,
273)
274
Brian Silverman4c7235a2021-11-17 19:04:37 -0800275llvm_conlyopts = [
276 "-std=gnu99",
277]
278
279llvm_copts = [
280 "-D__STDC_FORMAT_MACROS",
281 "-D__STDC_CONSTANT_MACROS",
282 "-D__STDC_LIMIT_MACROS",
283 "-D_FILE_OFFSET_BITS=64",
284 "-fmessage-length=100",
285 "-fmacro-backtrace-limit=0",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800286 "-ggdb3",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800287]
288
289llvm_cxxopts = [
Philipp Schraderf43b18b2023-08-23 20:05:10 -0700290 "-std=gnu++20",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800291]
292
Brian Silverman1e7c8972022-02-03 23:15:41 -0800293llvm_opt_copts = [
294 "-DAOS_DEBUG=0",
295]
296
297llvm_fastbuild_copts = [
298 "-DAOS_DEBUG=0",
299]
300
Brian Silverman4c7235a2021-11-17 19:04:37 -0800301llvm_dbg_copts = [
302 "-DAOS_DEBUG=1",
303]
Brian Silvermanc0309a02022-01-01 23:57:03 -0800304
305llvm_toolchain(
306 name = "llvm_toolchain",
Austin Schuh1e69d422023-06-25 16:57:01 -0700307 additional_target_compatible_with = {},
Brian Silverman4c7235a2021-11-17 19:04:37 -0800308 conlyopts = {
309 "linux-x86_64": llvm_conlyopts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800310 "linux-aarch64": llvm_conlyopts,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800311 },
312 copts = {
313 "linux-x86_64": llvm_copts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800314 "linux-aarch64": llvm_copts,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800315 },
316 cxxopts = {
317 "linux-x86_64": llvm_cxxopts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800318 "linux-aarch64": llvm_cxxopts,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800319 },
320 dbg_copts = {
321 "linux-x86_64": llvm_dbg_copts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800322 "linux-aarch64": llvm_dbg_copts,
Brian Silverman1e7c8972022-02-03 23:15:41 -0800323 },
324 fastbuild_copts = {
325 "linux-x86_64": llvm_fastbuild_copts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800326 "linux-aarch64": llvm_fastbuild_copts,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800327 },
328 llvm_version = llvm_version,
Brian Silverman1e7c8972022-02-03 23:15:41 -0800329 opt_copts = {
330 "linux-x86_64": llvm_opt_copts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800331 "linux-aarch64": llvm_opt_copts,
Brian Silverman1e7c8972022-02-03 23:15:41 -0800332 },
Brian Silverman4c7235a2021-11-17 19:04:37 -0800333 standard_libraries = {
Austin Schuh0bd410a2023-11-05 12:38:12 -0800334 "linux-x86_64": "libstdc++-12",
Austin Schuh86d980e2023-10-20 22:44:47 -0700335 "linux-aarch64": "libstdc++-12",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800336 },
337 static_libstdcxx = False,
Brian Silvermanc0309a02022-01-01 23:57:03 -0800338 sysroot = {
339 "linux-x86_64": "@amd64_debian_sysroot//:sysroot_files",
Austin Schuh86d980e2023-10-20 22:44:47 -0700340 "linux-aarch64": "@arm64_debian_sysroot//:sysroot_files",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800341 },
342 target_toolchain_roots = {
343 "linux-x86_64": "@llvm_k8//",
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800344 "linux-aarch64": "@llvm_aarch64//",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800345 },
346 toolchain_roots = {
347 "linux-x86_64": "@llvm_k8//",
Tyler Chatow486ad3e2022-03-23 13:32:03 -0700348 "linux-aarch64": "@llvm_aarch64//",
Brian Silvermanc0309a02022-01-01 23:57:03 -0800349 },
350)
351
Brian Silverman4c7235a2021-11-17 19:04:37 -0800352load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
353
354llvm_register_toolchains()
355
Philipp Schraderdada1072020-11-24 11:34:46 -0800356register_toolchains(
Philipp Schraderdada1072020-11-24 11:34:46 -0800357 "//tools/cpp:cc-toolchain-roborio",
358 "//tools/cpp:cc-toolchain-cortex-m4f",
Austin Schuh0a96ea32022-01-01 22:29:30 -0800359 "//tools/cpp:cc-toolchain-rp2040",
James Kuszmaul5a728562023-12-28 21:45:01 -0800360 "//tools/cpp:cc-toolchain-cortex-m4f-imu",
Philipp Schraderdada1072020-11-24 11:34:46 -0800361 # Find a good way to select between these two M4F toolchains.
362 #"//tools/cpp:cc-toolchain-cortex-m4f-k22",
Philipp Schraderf198a152021-12-05 09:18:23 -0800363 "//tools/python:python_toolchain",
Philipp Schrader73e56602021-12-06 21:37:30 -0800364 "//tools/go:noop_go_toolchain",
Brian Silverman847121b2022-03-09 15:48:08 -0800365 "//tools/rust:rust-toolchain-x86",
366 "//tools/rust:rust-toolchain-armv7",
367 "//tools/rust:rust-toolchain-arm64",
Brian Silvermana8ad1af2022-07-23 16:05:12 -0700368 # TODO(Brian): Make this work. See the comment on
369 # //tools/platforms:linux_roborio for details.
370 #"//tools/rust:rust-toolchain-roborio",
Ravago Jones16809802021-11-18 20:40:03 -0800371 "//tools/rust:noop_rust_toolchain",
Philipp Schrader54047962022-02-16 21:05:11 -0800372 "//tools/ts:noop_node_toolchain",
Philipp Schraderdada1072020-11-24 11:34:46 -0800373)
374
Austin Schuhf093fa52019-06-23 20:47:23 -0700375http_archive(
Austin Schuhd57edc42019-09-21 17:52:38 -0700376 name = "com_google_absl",
James Kuszmaul203bfc22023-01-13 22:37:06 -0800377 patch_args = ["-p1"],
378 patches = ["//third_party/abseil:abseil.patch"],
Austin Schuh8f99c822024-05-05 22:43:40 -0700379 sha256 = "733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc",
380 strip_prefix = "abseil-cpp-20240116.2",
381 url = "https://github.com/abseil/abseil-cpp/archive/refs/tags/20240116.2.tar.gz",
Austin Schuh36244a12019-09-21 17:52:38 -0700382)
383
Alex Perrycb7da4b2019-08-28 19:35:56 -0700384local_repository(
385 name = "org_tuxfamily_eigen",
386 path = "third_party/eigen",
387)
388
James Kuszmaulbc02ff42021-01-15 20:41:30 -0800389local_repository(
390 name = "com_github_rawrtc_re",
391 path = "third_party/rawrtc/re",
392)
393
394local_repository(
395 name = "com_github_rawrtc_rew",
396 path = "third_party/rawrtc/rew",
397)
398
399local_repository(
400 name = "com_github_rawrtc_usrsctp",
401 path = "third_party/rawrtc/usrsctp",
402)
403
404local_repository(
405 name = "com_github_rawrtc_rawrtc_common",
406 path = "third_party/rawrtc/rawrtc-common",
407)
408
409local_repository(
410 name = "com_github_rawrtc_rawrtc_data_channel",
411 path = "third_party/rawrtc/rawrtc-data-channel",
412)
413
414local_repository(
415 name = "com_github_rawrtc_rawrtc",
416 path = "third_party/rawrtc/rawrtc",
417)
418
Austin Schuh36244a12019-09-21 17:52:38 -0700419# C++ rules for Bazel.
420http_archive(
421 name = "rules_cc",
Austin Schuhac9023e2024-06-25 19:01:50 -0700422 sha256 = "d75a040c32954da0d308d3f2ea2ba735490f49b3a7aa3e4b40259ca4b814f825",
423 urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.10-rc1/rules_cc-0.0.10-rc1.tar.gz"],
Austin Schuh36244a12019-09-21 17:52:38 -0700424)
Austin Schuhd57edc42019-09-21 17:52:38 -0700425
Austin Schuh4759ffc2015-10-07 20:39:56 -0700426new_local_repository(
Brian Silverman7bda6212018-08-05 11:42:11 -0700427 name = "usr_repo",
Austin Schuhf093fa52019-06-23 20:47:23 -0700428 build_file = "@//debian:usr.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700429 path = "/usr",
Austin Schuh4759ffc2015-10-07 20:39:56 -0700430)
431
Austin Schuh1f9aeb42015-11-12 23:34:49 -0800432new_git_repository(
Brian Silverman7bda6212018-08-05 11:42:11 -0700433 name = "slycot_repo",
Tyler Chatow2584bb12018-10-27 20:48:35 -0700434 build_file = "@//debian:slycot.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700435 commit = "5af5f283cb23cbe23c4dfea4d5e56071bdbd6e70",
436 remote = "https://github.com/avventi/Slycot.git",
Austin Schuh1f9aeb42015-11-12 23:34:49 -0800437)
438
James Kuszmaul9776b392023-01-14 14:08:08 -0800439# TODO(Ravago, Max, Alex): https://github.com/wpilibsuite/opensdk
Austin Schuhf093fa52019-06-23 20:47:23 -0700440http_archive(
Brian Silverman7bda6212018-08-05 11:42:11 -0700441 name = "arm_frc_linux_gnueabi_repo",
Austin Schuhf093fa52019-06-23 20:47:23 -0700442 build_file = "@//tools/cpp/arm-frc-linux-gnueabi:arm-frc-linux-gnueabi.BUILD",
Austin Schuhe991fe22020-11-18 16:53:39 -0800443 patches = ["//debian:fts.patch"],
James Kuszmaul686f62c2023-11-22 20:38:56 -0800444 sha256 = "10349791e4f9fa33100ee52a84e7f9ba4df581963818334771253369b0d12061",
James Kuszmaul9776b392023-01-14 14:08:08 -0800445 strip_prefix = "roborio-academic",
James Kuszmaul686f62c2023-11-22 20:38:56 -0800446 url = "https://github.com/wpilibsuite/opensdk/releases/download/v2024-1/cortexa9_vfpv3-roborio-academic-2024-x86_64-linux-gnu-Toolchain-12.1.0.tgz",
Austin Schuh55139fe2015-10-14 23:55:24 -0700447)
Austin Schuhe456f152015-11-27 13:44:39 -0800448
Austin Schuh86d980e2023-10-20 22:44:47 -0700449# The main partition built from //frc971/orin/build_rootfs.py.
Brian Silvermanbf4c1312020-01-12 11:35:45 -0800450http_archive(
Austin Schuh86d980e2023-10-20 22:44:47 -0700451 name = "arm64_debian_sysroot",
452 build_file = "@//:compilers/orin_debian_rootfs.BUILD",
Austin Schuhf5dbe2c2024-04-06 16:10:24 -0700453 sha256 = "9fefccc1877a7b5986e7ad29ac49a4217bfbb0fbea1bcc0314beff5d03a430cd",
454 url = "https://software.frc971.org/Build-Dependencies/2024-04-06-bookworm-arm64-nvidia-rootfs.tar.zst",
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800455)
456
Austin Schuh0bd410a2023-11-05 12:38:12 -0800457# Sysroot generated using //frc971/amd64/build_rootfs.py
Brian Silverman60606c92020-01-15 22:45:04 -0800458http_archive(
459 name = "amd64_debian_sysroot",
Austin Schuh0bd410a2023-11-05 12:38:12 -0800460 build_file = "@//:compilers/amd64_debian_rootfs.BUILD",
Austin Schuh94dbdf32024-04-11 22:51:09 -0700461 sha256 = "ceaf7e3fd4af04aca2ff0d55c94ce30c2b45d1136b0e81e9be5ebc1003f96052",
462 url = "https://software.frc971.org/Build-Dependencies/2023-12-10-bookworm-amd64-nvidia-rootfs.tar.zst",
Brian Silverman60606c92020-01-15 22:45:04 -0800463)
464
Brian Silverman82a12b92019-01-19 21:52:10 -0800465# Generated with:
Austin Schuh9950f682021-11-06 15:27:58 -0700466# git fetch https://github.com/wpilibsuite/ni-libraries main
Austin Schuhd3c72912022-02-22 18:05:32 -0800467# git archive --output=allwpilib_ni-libraries_776db4e8aed31a651fa2f590e7468c69b384b42a.tar.gz --format=tar.gz 776db4e8aed31a651fa2f590e7468c69b384b42a
Austin Schuhf093fa52019-06-23 20:47:23 -0700468http_archive(
James Kuszmaulc9c46b32019-12-08 21:10:00 -0800469 name = "allwpilib_ni_libraries",
470 build_file = "@//debian:ni-libraries.BUILD",
Maxwell Henderson6ec65732024-01-09 16:43:37 -0800471 sha256 = "86458884701c817351b2ec651a2f13591258da54b4f54f05d8f1ce04eb214ba5",
472 strip_prefix = "ni-libraries-2024.2.1",
473 url = "https://github.com/wpilibsuite/ni-libraries/archive/refs/tags/v2024.2.1.zip",
Brian Silverman82a12b92019-01-19 21:52:10 -0800474)
475
Brian Silverman3fca9d72016-02-20 02:32:51 -0500476# For protobuf. Don't use these.
477bind(
Brian Silverman7bda6212018-08-05 11:42:11 -0700478 name = "six",
Philipp Schrader01535ee2023-01-08 13:19:03 -0800479 actual = "@pip//six",
Brian Silverman3fca9d72016-02-20 02:32:51 -0500480)
Brian Silverman7bda6212018-08-05 11:42:11 -0700481
Brian Silverman3fca9d72016-02-20 02:32:51 -0500482bind(
Brian Silverman7bda6212018-08-05 11:42:11 -0700483 name = "gtest",
James Kuszmaul3aabc1c2023-01-13 21:33:43 -0800484 actual = "@com_google_googletest//:gtest",
Brian Silverman3fca9d72016-02-20 02:32:51 -0500485)
Brian Silverman7bda6212018-08-05 11:42:11 -0700486
Brian Silverman3fca9d72016-02-20 02:32:51 -0500487bind(
Brian Silverman7bda6212018-08-05 11:42:11 -0700488 name = "gtest_main",
James Kuszmaul3aabc1c2023-01-13 21:33:43 -0800489 actual = "@com_google_googletest//:gtest_main",
Brian Silverman3fca9d72016-02-20 02:32:51 -0500490)
491
James Kuszmaul59a308f2023-01-28 19:14:07 -0800492http_archive(
493 name = "april_tag_test_image",
494 build_file_content = """
495filegroup(
496 name = "april_tag_test_image",
497 srcs = ["test.bfbs", "expected.jpeg", "expected.png"],
498 visibility = ["//visibility:public"],
499)""",
500 sha256 = "5312c79b19e9883b3cebd9d65b4438a2bf05b41da0bcd8c35e19d22c3b2e1859",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700501 urls = ["https://software.frc971.org/Build-Dependencies/test_image_frc971.vision.CameraImage_2023.01.28.tar.gz"],
James Kuszmaul59a308f2023-01-28 19:14:07 -0800502)
503
Filip Kujawa8c76e5d2023-04-08 16:20:27 -0700504http_file(
505 name = "game_pieces_edgetpu_model",
506 downloaded_file_path = "edgetpu_model.tflite",
Filip Kujawaec433e12023-04-09 19:58:59 -0700507 sha256 = "3d37f34805d017153064076519aaf4b532658a3b8f2518bce8787f27a5c3064c",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700508 urls = ["https://software.frc971.org/Build-Dependencies/models/2023/model_edgetpu_2023.04.09_3.tflite"],
Filip Kujawa8c76e5d2023-04-08 16:20:27 -0700509)
510
Brian Silverman4aa83042018-01-05 12:47:31 -0800511# Recompressed from libusb-1.0.21.7z.
512http_file(
Brian Silverman7bda6212018-08-05 11:42:11 -0700513 name = "libusb_1_0_windows",
Austin Schuh4ac96a82019-08-14 20:24:23 -0700514 downloaded_file_path = "libusb-1.0.21-windows.tar.xz",
Brian Silverman7bda6212018-08-05 11:42:11 -0700515 sha256 = "fc2ba03992f343aabbaf9eb90559c6e00cdc6a2bd914d7cebea85857d5244015",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700516 urls = ["https://software.frc971.org/Build-Dependencies/libusb-1.0.21-windows.tar.xz"],
Brian Silverman4aa83042018-01-05 12:47:31 -0800517)
Brian Silvermand3ad1652018-02-18 22:16:29 -0500518
519# The data tarball of the same-named Debian package.
Austin Schuhf093fa52019-06-23 20:47:23 -0700520http_archive(
Brian Silvermand3ad1652018-02-18 22:16:29 -0500521 name = "f2c",
Austin Schuhf093fa52019-06-23 20:47:23 -0700522 build_file = "@//debian:f2c.BUILD",
Brian Silvermand3ad1652018-02-18 22:16:29 -0500523 sha256 = "2c677437f8217a2e2b23e41b33995d0571644fc1bea46de858f8913a5053e3f4",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700524 url = "https://software.frc971.org/Build-Dependencies/f2c_20100827-1_amd64.xz.tar.xz",
Brian Silvermand3ad1652018-02-18 22:16:29 -0500525)
526
527# Downloaded from http://www.netlib.org/clapack/.
Austin Schuhf093fa52019-06-23 20:47:23 -0700528http_archive(
Brian Silverman7bda6212018-08-05 11:42:11 -0700529 name = "clapack",
Austin Schuhf093fa52019-06-23 20:47:23 -0700530 build_file = "@//debian:clapack.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700531 sha256 = "6dc4c382164beec8aaed8fd2acc36ad24232c406eda6db462bd4c41d5e455fac",
532 strip_prefix = "CLAPACK-3.2.1/",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700533 url = "https://software.frc971.org/Build-Dependencies/clapack-3.2.1.tgz",
Brian Silverman7bda6212018-08-05 11:42:11 -0700534)
535
Austin Schuhf093fa52019-06-23 20:47:23 -0700536http_archive(
Philipp Schrader41011a12022-03-13 12:49:32 -0700537 name = "postgresql_amd64",
538 build_file = "@//debian:postgresql_amd64.BUILD",
Austin Schuhb7775c02023-06-02 18:12:02 -0700539 sha256 = "483e199d0e7feae7cca0df132c649b5c20ddcc1a17760e656c25709f44f57a65",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700540 url = "https://software.frc971.org/Build-Dependencies/postgresql_amd64_v2.tar.gz",
Philipp Schrader41011a12022-03-13 12:49:32 -0700541)
542
543http_archive(
Brian Silverman7bda6212018-08-05 11:42:11 -0700544 name = "patch",
Austin Schuhf093fa52019-06-23 20:47:23 -0700545 build_file = "@//debian:patch.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700546 sha256 = "b5ce139648a2e04f5585948ddad2fdae24dd4ee7976ac5a22d6ae7bd5674631e",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700547 url = "https://software.frc971.org/Build-Dependencies/patch.tar.gz",
Brian Silvermand3ad1652018-02-18 22:16:29 -0500548)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700549
Austin Schuhf093fa52019-06-23 20:47:23 -0700550http_archive(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700551 name = "rsync",
552 build_file = "@//debian:rsync.BUILD",
James Kuszmaulc6ea63a2023-09-06 20:36:46 -0700553 sha256 = "75ea8ce442c94fd12c0d00eb24860ac1de5ea6af56154bb1b195a96018c9e8a2",
554 url = "https://software.frc971.org/Build-Dependencies/rsync-2023.09.06.tar.gz",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700555)
556
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800557# //debian:ssh
Austin Schuh71f6fa72019-08-31 18:23:02 -0700558http_archive(
559 name = "ssh",
560 build_file = "@//debian:ssh.BUILD",
James Kuszmaulc6ea63a2023-09-06 20:36:46 -0700561 sha256 = "9c4a9eefa605283486fb15a44ef9977d4a95b55c3a41c4e71cfbacd1cf20a4b5",
562 url = "https://software.frc971.org/Build-Dependencies/ssh-2023.09.06.tar.gz",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700563)
564
565http_archive(
Ravago Jones3b4fd912023-03-18 13:35:17 -0700566 name = "ffmpeg",
567 build_file_content = """
568load("@bazel_skylib//rules:native_binary.bzl", "native_binary")
569
570native_binary(
571 name = "ffmpeg",
572 src = "ffmpeg-6.0.1-amd64-static/ffmpeg",
573 out = "ffmpeg",
574 visibility = ["//visibility:public"],
575 target_compatible_with = ["@platforms//cpu:x86_64", "@platforms//os:linux"],
576)
577 """,
578 sha256 = "28268bf402f1083833ea269331587f60a242848880073be8016501d864bd07a5",
579 url = "https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-6.0.1-amd64-static.tar.xz",
580)
581
582http_archive(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800583 name = "apache2",
584 build_file = "@//debian:apache2.BUILD",
585 sha256 = "98b0ad6d911751ba0aa486429e6278f995e7bbabd928c7d3d44c888fa2bf371b",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700586 url = "https://software.frc971.org/Build-Dependencies/apache2.tar.gz",
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800587)
588
589http_archive(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700590 name = "pandoc",
Austin Schuhf093fa52019-06-23 20:47:23 -0700591 build_file = "@//debian:pandoc.BUILD",
Stephan Pleinesecfddf92023-12-14 19:14:40 -0800592 sha256 = "3c98503f29f2a7f771647b24a4b591bbe5539119b6b5a006ff09be7bec47bc0e",
593 url = "https://software.frc971.org/Build-Dependencies/pandoc-2023.12.14.tar.gz",
Brian Silverman7297c0c2018-08-05 13:43:00 -0700594)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700595
Austin Schuhf093fa52019-06-23 20:47:23 -0700596http_archive(
Brian Silverman4f6ba442018-08-05 14:34:58 -0700597 name = "libusb",
Austin Schuhf093fa52019-06-23 20:47:23 -0700598 build_file = "@//debian:libusb.BUILD",
Brian Silverman4f6ba442018-08-05 14:34:58 -0700599 sha256 = "3ca5cc2d317226f6646866ff9e8c443db3b0f6c82f828e800240982727531590",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700600 url = "https://software.frc971.org/Build-Dependencies/libusb.tar.gz",
Brian Silverman4f6ba442018-08-05 14:34:58 -0700601)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700602
Austin Schuhf093fa52019-06-23 20:47:23 -0700603http_archive(
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700604 name = "mingw_compiler",
Austin Schuhf093fa52019-06-23 20:47:23 -0700605 build_file = "@//debian:mingw_compiler.BUILD",
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700606 sha256 = "45e86a8460f2151a4f0306e7ae7b06761029d2412ee16f63d1e8d2d29354e378",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700607 url = "https://software.frc971.org/Build-Dependencies/mingw_compiler.tar.gz",
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700608)
Brian Silverman6470f442018-08-05 12:08:16 -0700609
Austin Schuhf093fa52019-06-23 20:47:23 -0700610http_archive(
Brian Silverman6470f442018-08-05 12:08:16 -0700611 name = "patchelf",
Austin Schuhf093fa52019-06-23 20:47:23 -0700612 build_file = "@//debian:patchelf.BUILD",
Brian Silverman6470f442018-08-05 12:08:16 -0700613 sha256 = "bf8b709909d7d9e30815dd228eeded7dc282e3ce3919d0589ccbb56ac8632abc",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700614 url = "https://software.frc971.org/Build-Dependencies/patchelf.tar.gz",
Brian Silverman6470f442018-08-05 12:08:16 -0700615)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700616
Austin Schuhf093fa52019-06-23 20:47:23 -0700617http_archive(
Brian Silverman50b9ac02018-08-12 13:24:10 -0700618 name = "arm_frc_gnueabi_deps",
Austin Schuhf093fa52019-06-23 20:47:23 -0700619 build_file = "@//debian:arm_frc_gnueabi_deps.BUILD",
Brian Silverman50b9ac02018-08-12 13:24:10 -0700620 sha256 = "4b26fe45010817dc136488ee1604ade21bd7c264c29f17d864fc6eba9d7442c4",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700621 url = "https://software.frc971.org/Build-Dependencies/arm_frc_gnueabi_deps.tar.gz",
Brian Silverman50b9ac02018-08-12 13:24:10 -0700622)
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700623
Austin Schuhf093fa52019-06-23 20:47:23 -0700624http_archive(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700625 name = "gtk_runtime",
626 build_file = "@//debian:gtk_runtime.BUILD",
Philipp Schrader7520ee62022-12-10 14:04:40 -0800627 sha256 = "5a6014d1783363be6bc95843d03bbb6513e650eaea60be2b1a4c65bf21981f9b",
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700628 url = "https://software.frc971.org/Build-Dependencies/gtk_runtime-4.tar.gz",
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700629)
630
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700631# Downloaded from
James Kuszmaulef420da2023-12-27 12:02:15 -0800632# From https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
Austin Schuhf093fa52019-06-23 20:47:23 -0700633http_archive(
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700634 name = "gcc_arm_none_eabi",
Austin Schuhf093fa52019-06-23 20:47:23 -0700635 build_file = "@//:compilers/gcc_arm_none_eabi.BUILD",
James Kuszmaulef420da2023-12-27 12:02:15 -0800636 sha256 = "6cd1bbc1d9ae57312bcd169ae283153a9572bd6a8e4eeae2fedfbc33b115fdbb",
637 strip_prefix = "arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi",
638 url = "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz",
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700639)
Austin Schuhad596222018-01-31 23:34:03 -0800640
Tyler Chatowfba57822022-03-22 19:38:41 -0700641# Java11 JDK.
Philipp Schrader6efe5732022-02-12 15:11:13 -0800642remote_java_repository(
Austin Schuhe18baff2018-10-20 17:40:42 -0700643 name = "openjdk_linux_archive",
Philipp Schrader6efe5732022-02-12 15:11:13 -0800644 prefix = "openjdk",
Tyler Chatowfba57822022-03-22 19:38:41 -0700645 sha256 = "60e65d32e38876f81ddb623e87ac26c820465b637e263e8bed1acdecb4ca9be2",
646 strip_prefix = "zulu11.54.25-ca-jdk11.0.14.1-linux_x64",
Philipp Schrader9670a2a2023-01-11 01:20:16 -0800647 target_compatible_with = [
648 "@platforms//cpu:x86_64",
649 "@platforms//os:linux",
650 ],
Austin Schuhe18baff2018-10-20 17:40:42 -0700651 urls = [
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700652 "https://software.frc971.org/Build-Dependencies/zulu11.54.25-ca-jdk11.0.14.1-linux_x64.tar.gz",
Austin Schuhe18baff2018-10-20 17:40:42 -0700653 ],
Tyler Chatowfba57822022-03-22 19:38:41 -0700654 version = "11",
655)
656
657remote_java_repository(
658 name = "openjdk_linux_archive_aarch64",
Tyler Chatowfba57822022-03-22 19:38:41 -0700659 prefix = "openjdk",
660 sha256 = "b0fb0bc303bb05b5042ef3d0939b9489f4a49a13a2d1c8f03c5d8ab23099454d",
661 strip_prefix = "zulu11.54.25-ca-jdk11.0.14.1-linux_aarch64",
Philipp Schrader9670a2a2023-01-11 01:20:16 -0800662 target_compatible_with = [
663 "@platforms//cpu:aarch64",
664 "@platforms//os:linux",
665 ],
Tyler Chatowfba57822022-03-22 19:38:41 -0700666 urls = [
Maxwell Henderson7a93a652023-06-24 15:17:09 -0700667 "https://software.frc971.org/Build-Dependencies/zulu11.54.25-ca-jdk11.0.14.1-linux_aarch64.tar.gz",
Tyler Chatowfba57822022-03-22 19:38:41 -0700668 ],
669 version = "11",
Austin Schuhe18baff2018-10-20 17:40:42 -0700670)
671
James Kuszmaul3aabc1c2023-01-13 21:33:43 -0800672http_archive(
Alex Perrycb7da4b2019-08-28 19:35:56 -0700673 name = "com_google_googletest",
James Kuszmaul3aabc1c2023-01-13 21:33:43 -0800674 patch_args = ["-p1"],
675 patches = ["//third_party/googletest:googletest.patch"],
Austin Schuhd0f25762024-06-25 21:19:45 -0700676 sha256 = "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7",
677 strip_prefix = "googletest-1.14.0",
678 urls = ["https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700679)
680
James Kuszmaul38169b92023-01-13 21:17:05 -0800681http_archive(
Austin Schuh6defdeb2019-01-21 21:00:30 -0800682 name = "com_github_google_benchmark",
James Kuszmaul38169b92023-01-13 21:17:05 -0800683 patch_args = ["-p1"],
684 patches = ["//third_party/google-benchmark:benchmark.patch"],
Austin Schuhd0f25762024-06-25 21:19:45 -0700685 sha256 = "3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45",
686 strip_prefix = "benchmark-1.8.4",
687 urls = ["https://github.com/google/benchmark/archive/refs/tags/v1.8.4.tar.gz"],
Austin Schuhcbc17402019-01-21 21:00:30 -0800688)
Austin Schuh033df092019-01-21 19:46:48 -0800689
Austin Schuh68156cb2024-06-25 21:24:29 -0700690http_archive(
Austin Schuh033df092019-01-21 19:46:48 -0800691 name = "com_google_ceres_solver",
Austin Schuh68156cb2024-06-25 21:24:29 -0700692 patch_args = ["-p1"],
693 patches = ["//third_party:ceres.patch"],
Austin Schuh99f7c6a2024-06-25 22:07:44 -0700694 sha256 = "5fef6cd0ed744a09e20d1c341a15b0f94ed0c8df43537e198a869e6c242c99d5",
695 strip_prefix = "ceres-solver-bd323ce698748bef0686eb27cb6cea4f88bb4f44",
696 urls = ["https://github.com/ceres-solver/ceres-solver/archive/bd323ce698748bef0686eb27cb6cea4f88bb4f44.zip"],
Austin Schuh70cc9552019-01-21 19:46:48 -0800697)
Austin Schuhf6b94632019-02-02 22:11:27 -0800698
Austin Schuhf093fa52019-06-23 20:47:23 -0700699http_archive(
Maxwell Hendersonfcc0d122023-08-05 17:03:34 -0700700 name = "ctre_phoenix6_api_cpp_headers",
James Kuszmaul9776b392023-01-14 14:08:08 -0800701 build_file_content = """
702cc_library(
703 name = 'api-cpp',
704 visibility = ['//visibility:public'],
James Kuszmaulcd622d52023-11-22 20:44:04 -0800705 hdrs = glob(['ctre/phoenix6/**/*.hpp']),
James Kuszmaul9776b392023-01-14 14:08:08 -0800706 includes = ["."],
707 deps = ["@//third_party/allwpilib/wpimath"],
708)
709""",
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800710 sha256 = "1b9295ac868d619d0263f285b372a22297798e45c8fdeb83ca99154a097c5c98",
James Kuszmaul9776b392023-01-14 14:08:08 -0800711 urls = [
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800712 "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/api-cpp/24.1.0/api-cpp-24.1.0-headers.zip",
James Kuszmaul9776b392023-01-14 14:08:08 -0800713 ],
714)
715
716http_archive(
Maxwell Hendersonfcc0d122023-08-05 17:03:34 -0700717 name = "ctre_phoenix6_api_cpp_athena",
James Kuszmaul9776b392023-01-14 14:08:08 -0800718 build_file_content = """
719filegroup(
720 name = 'shared_libraries',
721 srcs = [
Maxwell Hendersonfcc0d122023-08-05 17:03:34 -0700722 'linux/athena/shared/libCTRE_Phoenix6.so',
James Kuszmaul9776b392023-01-14 14:08:08 -0800723 ],
724 visibility = ['//visibility:public'],
725)
726
727cc_library(
728 name = 'api-cpp',
729 visibility = ['//visibility:public'],
Maxwell Hendersonfcc0d122023-08-05 17:03:34 -0700730 srcs = ['linux/athena/shared/libCTRE_Phoenix6.so'],
James Kuszmaul9776b392023-01-14 14:08:08 -0800731 target_compatible_with = ['@//tools/platforms/hardware:roborio'],
732)
733""",
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800734 sha256 = "51f4921f8995e3e80ba347a90f6fa5c0cb7d0e438923a1a736554f263e2d5b8e",
James Kuszmaul9776b392023-01-14 14:08:08 -0800735 urls = [
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800736 "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/api-cpp/24.1.0/api-cpp-24.1.0-linuxathena.zip",
James Kuszmaul9776b392023-01-14 14:08:08 -0800737 ],
738)
739
740http_archive(
Maxwell Hendersonfcc0d122023-08-05 17:03:34 -0700741 name = "ctre_phoenix6_tools_headers",
James Kuszmaul9776b392023-01-14 14:08:08 -0800742 build_file_content = """
743cc_library(
744 name = 'tools',
745 visibility = ['//visibility:public'],
746 hdrs = glob(['ctre/**/*.h', 'ctre/**/*.hpp']),
747)
748""",
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800749 sha256 = "72be3e50205e2546736361e3aba9c0de5d5318b263c195600f9b558c3d92cb9e",
James Kuszmaul9776b392023-01-14 14:08:08 -0800750 urls = [
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800751 "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/tools/24.1.0/tools-24.1.0-headers.zip",
James Kuszmaul9776b392023-01-14 14:08:08 -0800752 ],
753)
754
755http_archive(
Maxwell Hendersonfcc0d122023-08-05 17:03:34 -0700756 name = "ctre_phoenix6_tools_athena",
James Kuszmaul9776b392023-01-14 14:08:08 -0800757 build_file_content = """
758filegroup(
759 name = 'shared_libraries',
760 srcs = [
761 'linux/athena/shared/libCTRE_PhoenixTools.so',
762 ],
763 visibility = ['//visibility:public'],
764)
765
766cc_library(
767 name = 'tools',
768 visibility = ['//visibility:public'],
769 srcs = ['linux/athena/shared/libCTRE_PhoenixTools.so'],
770 target_compatible_with = ['@//tools/platforms/hardware:roborio'],
771)
772""",
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800773 sha256 = "76d30cb8c0988eb6accab10e77ceae492782edb64c06f7df628b8c161cf0220a",
James Kuszmaul9776b392023-01-14 14:08:08 -0800774 urls = [
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800775 "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/tools/24.1.0/tools-24.1.0-linuxathena.zip",
James Kuszmaul9776b392023-01-14 14:08:08 -0800776 ],
777)
778
779http_archive(
James Kuszmaul02eb05e2019-12-22 12:32:18 -0800780 name = "ctre_phoenix_api_cpp_headers",
Austin Schuhf6b94632019-02-02 22:11:27 -0800781 build_file_content = """
782cc_library(
783 name = 'api-cpp',
784 visibility = ['//visibility:public'],
785 hdrs = glob(['ctre/phoenix/**/*.h']),
786)
787""",
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800788 sha256 = "d2790e2495a59a3b14ab4b0fd03c2e25292d6874168f5642165acb0d1bab2f99",
Austin Schuhf6b94632019-02-02 22:11:27 -0800789 urls = [
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800790 "https://maven.ctr-electronics.com/release/com/ctre/phoenix/api-cpp/5.33.0/api-cpp-5.33.0-headers.zip",
Austin Schuhf6b94632019-02-02 22:11:27 -0800791 ],
792)
793
Austin Schuhf093fa52019-06-23 20:47:23 -0700794http_archive(
James Kuszmaul02eb05e2019-12-22 12:32:18 -0800795 name = "ctre_phoenix_api_cpp_athena",
Austin Schuhf6b94632019-02-02 22:11:27 -0800796 build_file_content = """
Austin Schuhde605f12022-02-23 23:08:19 -0800797filegroup(
798 name = 'shared_libraries',
799 srcs = [
800 'linux/athena/shared/libCTRE_Phoenix.so',
801 ],
802 visibility = ['//visibility:public'],
803)
804
Austin Schuhf6b94632019-02-02 22:11:27 -0800805cc_library(
806 name = 'api-cpp',
807 visibility = ['//visibility:public'],
Austin Schuhde605f12022-02-23 23:08:19 -0800808 srcs = ['linux/athena/shared/libCTRE_Phoenix.so'],
Philipp Schraderdada1072020-11-24 11:34:46 -0800809 target_compatible_with = ['@//tools/platforms/hardware:roborio'],
Austin Schuhf6b94632019-02-02 22:11:27 -0800810)
811""",
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800812 sha256 = "e67348b0db1e61797700b5c4e50b38b745f91899665b740b09fde879e4d8ad7a",
Austin Schuhf6b94632019-02-02 22:11:27 -0800813 urls = [
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800814 "https://maven.ctr-electronics.com/release/com/ctre/phoenix/api-cpp/5.33.0/api-cpp-5.33.0-linuxathena.zip",
Austin Schuhf6b94632019-02-02 22:11:27 -0800815 ],
816)
817
James Kuszmaul02eb05e2019-12-22 12:32:18 -0800818http_archive(
819 name = "ctre_phoenix_cci_headers",
Austin Schuhf6b94632019-02-02 22:11:27 -0800820 build_file_content = """
821cc_library(
822 name = 'cci',
823 visibility = ['//visibility:public'],
824 hdrs = glob(['ctre/phoenix/**/*.h']),
825)
826""",
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800827 sha256 = "56cb8272d623721560eea360730d2508f4f365e2ac1060aec5fbd546cffc0771",
Austin Schuhf6b94632019-02-02 22:11:27 -0800828 urls = [
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800829 "https://maven.ctr-electronics.com/release/com/ctre/phoenix/cci/5.33.0/cci-5.33.0-headers.zip",
Austin Schuhf6b94632019-02-02 22:11:27 -0800830 ],
831)
832
Austin Schuhf093fa52019-06-23 20:47:23 -0700833http_archive(
James Kuszmaul02eb05e2019-12-22 12:32:18 -0800834 name = "ctre_phoenix_cci_athena",
Austin Schuhf6b94632019-02-02 22:11:27 -0800835 build_file_content = """
Austin Schuhde605f12022-02-23 23:08:19 -0800836filegroup(
837 name = 'shared_libraries',
838 srcs = [
839 'linux/athena/shared/libCTRE_PhoenixCCI.so',
840 ],
841 visibility = ['//visibility:public'],
842)
843
Austin Schuhf6b94632019-02-02 22:11:27 -0800844cc_library(
845 name = 'cci',
846 visibility = ['//visibility:public'],
Austin Schuhde605f12022-02-23 23:08:19 -0800847 srcs = ['linux/athena/shared/libCTRE_PhoenixCCI.so'],
Philipp Schraderdada1072020-11-24 11:34:46 -0800848 target_compatible_with = ['@//tools/platforms/hardware:roborio'],
Austin Schuhf6b94632019-02-02 22:11:27 -0800849)
850""",
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800851 sha256 = "7bd8e9950c3e62a3c6ce967e3491c438ba08effde51d434f85b756fa004fbec9",
Austin Schuhf6b94632019-02-02 22:11:27 -0800852 urls = [
Maxwell Hendersonac681cd2024-01-09 15:36:45 -0800853 "https://maven.ctr-electronics.com/release/com/ctre/phoenix/cci/5.33.0/cci-5.33.0-linuxathena.zip",
Austin Schuhf6b94632019-02-02 22:11:27 -0800854 ],
855)
Austin Schuheed14442019-03-23 14:42:46 -0700856
857http_archive(
Maxwell Henderson8108e992024-05-07 22:00:22 -0700858 name = "ctre_phoenix6_arm64",
859 build_file_content = """
860filegroup(
861 name = 'shared_libraries',
862 srcs = [
863 'usr/lib/phoenix6/libCTRE_PhoenixTools.so',
864 'usr/lib/phoenix6/libCTRE_Phoenix6.so',
865 ],
866 visibility = ['//visibility:public'],
867 target_compatible_with = ['@platforms//cpu:arm64'],
868)
869
870# TODO(max): Use cc_import once they add a defines property.
871# See: https://github.com/bazelbuild/bazel/issues/19753
872cc_library(
873 name = "shared_libraries_lib",
874 visibility = ['//visibility:public'],
875 srcs = [
876 'usr/lib/phoenix6/libCTRE_PhoenixTools.so',
877 'usr/lib/phoenix6/libCTRE_Phoenix6.so',
878 ],
879 target_compatible_with = ['@platforms//cpu:arm64'],
880)
881
882cc_library(
883 name = 'headers',
884 visibility = ['//visibility:public'],
885 hdrs = glob(['usr/include/phoenix6/**/*.hpp', 'usr/include/phoenix6/**/*.h']),
886 includes = ["usr/include/phoenix6/"],
887 target_compatible_with = ['@platforms//cpu:arm64'],
888 defines = [
889 "UNIT_LIB_DISABLE_FMT",
890 "UNIT_LIB_ENABLE_IOSTREAM"
891 ],
892)
893""",
894 sha256 = "635b19f019d1283749fb23a95ad9e13ddd9d5013cff4c838303d898e7d9556bd",
895 urls = [
896 "https://software.frc971.org/Build-Dependencies/phoenix6_24.2.0_5.4.2024.tar.gz",
897 ],
898)
899
900http_archive(
Philipp Schrader175a93c2023-02-19 13:13:40 -0800901 name = "aspect_rules_js",
Austin Schuh8f99c822024-05-05 22:43:40 -0700902 patch_args = [
903 "-p1",
904 ],
905 patches = [
906 "//third_party:rules_js/0001-Fix-package-permissions.patch",
907 ],
908 sha256 = "bc9b4a01ef8eb050d8a7a050eedde8ffb1e45a56b0e4094e26f06c17d5fcf1d5",
909 strip_prefix = "rules_js-1.41.2",
910 url = "https://github.com/aspect-build/rules_js/releases/download/v1.41.2/rules_js-v1.41.2.tar.gz",
Austin Schuhda9d0602019-09-15 17:29:38 -0700911)
Austin Schuheed14442019-03-23 14:42:46 -0700912
Philipp Schrader175a93c2023-02-19 13:13:40 -0800913load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
Philipp Schrader87277f42022-01-01 07:45:12 -0800914
Philipp Schrader175a93c2023-02-19 13:13:40 -0800915rules_js_dependencies()
Philipp Schrader54047962022-02-16 21:05:11 -0800916
Philipp Schraderba072d92024-02-21 17:00:37 -0800917load("@bazel_features//:deps.bzl", "bazel_features_deps")
918
919bazel_features_deps()
920
921load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock", "pnpm_repository")
922
923pnpm_repository(name = "pnpm")
924
Alex Perryb3168082022-01-22 13:36:13 -0800925http_archive(
Philipp Schrader175a93c2023-02-19 13:13:40 -0800926 name = "aspect_rules_esbuild",
Philipp Schraderba072d92024-02-21 17:00:37 -0800927 sha256 = "999349afef62875301f45ec8515189ceaf2e85b1e67a17e2d28b95b30e1d6c0b",
928 strip_prefix = "rules_esbuild-0.18.0",
929 url = "https://github.com/aspect-build/rules_esbuild/releases/download/v0.18.0/rules_esbuild-v0.18.0.tar.gz",
Philipp Schrader175a93c2023-02-19 13:13:40 -0800930)
931
932load("@aspect_rules_esbuild//esbuild:dependencies.bzl", "rules_esbuild_dependencies")
933
934rules_esbuild_dependencies()
935
936load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
937
938nodejs_register_toolchains(
939 name = "nodejs",
940 node_version = DEFAULT_NODE_VERSION,
941)
942
943npm_translate_lock(
944 name = "npm",
945 data = [
Philipp Schraderaa191322024-04-28 20:23:52 -0700946 "//aos/analysis/foxglove_extension:package.json",
Philipp Schraderc70fc622024-08-14 20:50:13 -0700947 "//control_loops/swerve/spline_ui/www:package.json",
Philipp Schrader175a93c2023-02-19 13:13:40 -0800948 "@//:package.json",
949 "@//:pnpm-workspace.yaml",
Philipp Schradere5d13942024-03-17 15:44:35 -0700950 "@//scouting/webserver/requests/messages:package.json",
Philipp Schrader175a93c2023-02-19 13:13:40 -0800951 "@//scouting/www:package.json",
Philipp Schrader175a93c2023-02-19 13:13:40 -0800952 "@//scouting/www/driver_ranking:package.json",
953 "@//scouting/www/entry:package.json",
Philipp Schrader175a93c2023-02-19 13:13:40 -0800954 "@//scouting/www/match_list:package.json",
955 "@//scouting/www/notes:package.json",
Philipp Schrader3d7dedc2024-03-16 16:27:25 -0700956 "@//scouting/www/pipes:package.json",
Philipp Schrader175a93c2023-02-19 13:13:40 -0800957 "@//scouting/www/rpc:package.json",
Philipp Schradere2e27ff2024-02-25 22:08:55 -0800958 "@//scouting/www/scan:package.json",
Philipp Schrader175a93c2023-02-19 13:13:40 -0800959 "@//scouting/www/shift_schedule:package.json",
Philipp Schraderad2a6fb2024-03-20 20:51:36 -0700960 "@//scouting/www/test/authorize:package.json",
Philipp Schrader175a93c2023-02-19 13:13:40 -0800961 "@//scouting/www/view:package.json",
Philipp Schrader54047962022-02-16 21:05:11 -0800962 ],
Philipp Schrader175a93c2023-02-19 13:13:40 -0800963
964 # Running lifecycle hooks on npm package fsevents@2.3.2 fails in a dramatic way:
965 # ```
966 # SyntaxError: Unexpected strict mode reserved word
967 # at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:117:18)
968 # at ESMLoader.moduleProvider (node:internal/modules/esm/loader:337:14)
969 # at async link (node:internal/modules/esm/module_job:70:21)
970 # ```
971 lifecycle_hooks_no_sandbox = False,
972 npmrc = "@//:.npmrc",
973 pnpm_lock = "//:pnpm-lock.yaml",
974 quiet = False,
975 update_pnpm_lock = False,
976 verify_node_modules_ignored = "//:.bazelignore",
977)
978
Philipp Schraderba072d92024-02-21 17:00:37 -0800979load("@aspect_rules_esbuild//esbuild:repositories.bzl", "LATEST_ESBUILD_VERSION", "esbuild_register_toolchains")
Philipp Schrader175a93c2023-02-19 13:13:40 -0800980
981esbuild_register_toolchains(
982 name = "esbuild",
983 esbuild_version = LATEST_ESBUILD_VERSION,
984)
985
986http_archive(
987 name = "aspect_rules_rollup",
988 patch_args = [
989 "-p1",
990 ],
991 patches = [
992 "//third_party:rules_rollup/0001-Fix-resolving-files.patch",
993 ],
Philipp Schraderba072d92024-02-21 17:00:37 -0800994 sha256 = "a0433a0b0206a45d362749d71bc1e4e0dacf5ca2a572b059328f9753392bca80",
995 strip_prefix = "rules_rollup-1.0.0",
996 url = "https://github.com/aspect-build/rules_rollup/releases/download/v1.0.0/rules_rollup-v1.0.0.tar.gz",
Philipp Schrader175a93c2023-02-19 13:13:40 -0800997)
998
Philipp Schrader175a93c2023-02-19 13:13:40 -0800999http_archive(
1000 name = "aspect_rules_terser",
Philipp Schraderba072d92024-02-21 17:00:37 -08001001 sha256 = "8424b4c064d0e490e5b6f215b993712ef641b77e03b68fdc64221edf48d14add",
1002 strip_prefix = "rules_terser-1.0.0",
1003 url = "https://github.com/aspect-build/rules_terser/releases/download/v1.0.0/rules_terser-v1.0.0.tar.gz",
Philipp Schrader175a93c2023-02-19 13:13:40 -08001004)
1005
1006load("@aspect_rules_terser//terser:dependencies.bzl", "rules_terser_dependencies")
1007
1008rules_terser_dependencies()
1009
Philipp Schrader175a93c2023-02-19 13:13:40 -08001010http_archive(
1011 name = "aspect_rules_ts",
Philipp Schraderba072d92024-02-21 17:00:37 -08001012 sha256 = "6ad28b5bac2bb5a74e737925fbc3f62ce1edabe5a48d61a9980c491ef4cedfb7",
1013 strip_prefix = "rules_ts-2.1.1",
1014 url = "https://github.com/aspect-build/rules_ts/releases/download/v2.1.1/rules_ts-v2.1.1.tar.gz",
Philipp Schrader175a93c2023-02-19 13:13:40 -08001015)
1016
1017load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
1018
Philipp Schraderba072d92024-02-21 17:00:37 -08001019rules_ts_dependencies(
1020 ts_version_from = "//:package.json",
1021)
Philipp Schrader175a93c2023-02-19 13:13:40 -08001022
1023load("@npm//:repositories.bzl", "npm_repositories")
1024
1025npm_repositories()
1026
1027http_archive(
1028 name = "aspect_rules_cypress",
Philipp Schraderd422be72024-02-25 20:18:08 -08001029 patch_args = ["-p1"],
1030 patches = [
1031 "//third_party:rules_cypress/0001-fix-incorrect-linux-checksums.patch",
1032 "//third_party:rules_cypress/0002-Add-support-for-cypress-13.6.6.patch",
1033 ],
Philipp Schraderba072d92024-02-21 17:00:37 -08001034 sha256 = "76947778d8e855eee3c15931e1fcdc1c2a25d56d6c0edd110b2227c05b794d08",
1035 strip_prefix = "rules_cypress-0.3.2",
Philipp Schrader175a93c2023-02-19 13:13:40 -08001036 urls = [
Philipp Schraderba072d92024-02-21 17:00:37 -08001037 "https://github.com/aspect-build/rules_cypress/archive/refs/tags/v0.3.2.tar.gz",
Philipp Schrader175a93c2023-02-19 13:13:40 -08001038 ],
1039)
1040
1041load("@aspect_rules_cypress//cypress:dependencies.bzl", "rules_cypress_dependencies")
1042load("@aspect_rules_cypress//cypress:repositories.bzl", "cypress_register_toolchains")
1043
1044rules_cypress_dependencies()
1045
1046cypress_register_toolchains(
1047 name = "cypress",
Philipp Schraderd422be72024-02-25 20:18:08 -08001048 cypress_version = "13.3.1",
Philipp Schrader175a93c2023-02-19 13:13:40 -08001049)
1050
1051# Copied from:
1052# https://github.com/aspect-build/rules_cypress/blob/3db1b74818ac4ce1b9d489a6e0065b36c1076761/internal_deps.bzl#L47
1053#
1054# To update CHROME_REVISION, use the below script
1055#
1056# LASTCHANGE_URL="https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2FLAST_CHANGE?alt=media"
1057# CHROME_REVISION=$(curl -s -S $LASTCHANGE_URL)
1058# echo "latest CHROME_REVISION_LINUX is $CHROME_REVISION"
Philipp Schraderd422be72024-02-25 20:18:08 -08001059CHROME_REVISION_LINUX = "1264932"
Philipp Schrader175a93c2023-02-19 13:13:40 -08001060
1061http_archive(
1062 name = "chrome_linux",
1063 build_file_content = """filegroup(
1064name = "all",
1065srcs = glob(["**"]),
1066visibility = ["//visibility:public"],
1067)""",
Philipp Schraderd422be72024-02-25 20:18:08 -08001068 sha256 = "4de54f43b2fc4812b9fad4145e44df6ed3063969174a8883ea42ed4c1ee58301",
Philipp Schrader175a93c2023-02-19 13:13:40 -08001069 strip_prefix = "chrome-linux",
1070 urls = [
1071 "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F" + CHROME_REVISION_LINUX + "%2Fchrome-linux.zip?alt=media",
1072 ],
Alex Perryb3168082022-01-22 13:36:13 -08001073)
1074
Brian Silvermane84b0cf2022-08-13 19:36:21 -07001075http_archive(
Philipp Schraderad2a6fb2024-03-20 20:51:36 -07001076 name = "chromedriver_linux",
1077 build_file_content = """
1078filegroup(
1079 name = "chromedriver",
1080 srcs = ["chromedriver-linux64/chromedriver"],
1081 visibility = ["//visibility:public"],
1082)""",
1083 sha256 = "527b81f8aaf94344af4103c1166ce5e65037e7ad071c773fe354c215d547ef73",
1084 urls = [
1085 "https://storage.googleapis.com/chrome-for-testing-public/124.0.6367.8/linux64/chromedriver-linux64.zip",
1086 ],
1087)
1088
1089http_archive(
Brian Silvermane84b0cf2022-08-13 19:36:21 -07001090 name = "rules_rust_tinyjson",
1091 build_file = "@rules_rust//util/process_wrapper:BUILD.tinyjson.bazel",
1092 sha256 = "1a8304da9f9370f6a6f9020b7903b044aa9ce3470f300a1fba5bc77c78145a16",
1093 strip_prefix = "tinyjson-2.3.0",
1094 type = "tar.gz",
1095 url = "https://crates.io/api/v1/crates/tinyjson/2.3.0/download",
1096)
1097
Adam Snaider770b97b2023-08-04 21:07:48 -07001098# Flatbuffers
1099local_repository(
1100 name = "com_github_google_flatbuffers",
1101 path = "third_party/flatbuffers",
1102)
1103
Brian Silverman01dfd872022-04-06 22:20:40 -07001104local_repository(
Ravago Jones16809802021-11-18 20:40:03 -08001105 name = "rules_rust",
Brian Silverman01dfd872022-04-06 22:20:40 -07001106 path = "third_party/rules_rust",
Ravago Jones16809802021-11-18 20:40:03 -08001107)
1108
Adam Snaiderb8097452023-07-10 23:18:26 -04001109load("@rules_rust//rust:repositories.bzl", "rust_analyzer_toolchain_repository", "rust_repository_set")
1110
1111RUST_VERSION = "1.70.0"
Ravago Jones16809802021-11-18 20:40:03 -08001112
Brian Silvermane84b0cf2022-08-13 19:36:21 -07001113rust_repository_set(
Ravago Jones16809802021-11-18 20:40:03 -08001114 name = "rust",
Brian Silverman8751d482022-05-18 23:28:44 -07001115 allocator_library = "@//tools/rust:forward_allocator",
Ravago Jones16809802021-11-18 20:40:03 -08001116 edition = "2021",
1117 exec_triple = "x86_64-unknown-linux-gnu",
1118 extra_target_triples = [
1119 "arm-unknown-linux-gnueabi",
1120 "armv7-unknown-linux-gnueabihf",
Philipp Schraderf1bbf342022-02-05 14:30:15 -08001121 "aarch64-unknown-linux-gnu",
Ravago Jones16809802021-11-18 20:40:03 -08001122 ],
Brian Silvermane84b0cf2022-08-13 19:36:21 -07001123 register_toolchain = False,
Adam Snaiderb8097452023-07-10 23:18:26 -04001124 rustfmt_version = RUST_VERSION,
1125 versions = [RUST_VERSION],
Ravago Jones16809802021-11-18 20:40:03 -08001126)
1127
Adam Snaider770b97b2023-08-04 21:07:48 -07001128load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
1129
1130crate_universe_dependencies()
1131
1132load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository")
1133
1134# Run `CARGO_BAZEL_REPIN=1 bazel sync --only=crate_index` to update the lock file
1135# after adding or removing any dependencies.
1136crates_repository(
1137 name = "crate_index",
1138 annotations = {
1139 "link-cplusplus": [
1140 # Bazel toolchains take care of linking the C++ standard library, so don't add
1141 # an extra flag via Rust by enabling the `nothing` feature. I'm not even sure
1142 # it would end up on the link command line, but this crate's build.rs attempts
1143 # to find a C++ compiler itself otherwise which definitely doesn't work.
1144 crate.annotation(
1145 crate_features = ["nothing"],
1146 ),
1147 ],
1148 "cxx": [
1149 crate.annotation(
1150 additive_build_file = "@//third_party/cargo:cxx/include.BUILD.bazel",
1151 extra_aliased_targets = ["cxx_cc"],
1152 gen_build_script = False,
1153 ),
1154 ],
1155 "log": [
1156 crate.annotation(
1157 rustc_flags = ["--cfg=atomic_cas"],
1158 ),
1159 ],
1160 },
1161 cargo_lockfile = "//:Cargo.lock",
1162 generator_sha256s = {"x86_64-unknown-linux-gnu": "1987a00e7ae12c705fa010b340410230ae8a47d7d95c02900191968b2e745649"},
1163 generator_urls = {
1164 "x86_64-unknown-linux-gnu": "https://software.frc971.org/Build-Dependencies/cargo-bazel-x86_64-unknown-linux-gnu",
1165 },
1166 lockfile = "//:Cargo.Bazel.lock",
1167 manifests = [
1168 "//:Cargo.toml",
1169 "//third_party/autocxx:Cargo.toml",
1170 "//third_party/autocxx:engine/Cargo.toml",
1171 "//third_party/autocxx:parser/Cargo.toml",
1172 "//third_party/autocxx:gen/cmd/Cargo.toml",
1173 "//third_party/autocxx:macro/Cargo.toml",
1174 "//third_party/autocxx:integration-tests/Cargo.toml",
1175 "@com_github_google_flatbuffers//rust:flatbuffers/Cargo.toml",
1176 ],
1177 rust_toolchain_cargo_template = "@rust__{triple}__{channel}_tools//:bin/{tool}",
1178 rust_toolchain_rustc_template = "@rust__{triple}__{channel}_tools//:bin/{tool}",
Adam Snaiderb8097452023-07-10 23:18:26 -04001179 rust_version = RUST_VERSION,
Adam Snaider770b97b2023-08-04 21:07:48 -07001180 supported_platform_triples = [
1181 "x86_64-unknown-linux-gnu",
1182 "arm-unknown-linux-gnueabi",
1183 "armv7-unknown-linux-gnueabihf",
1184 "aarch64-unknown-linux-gnu",
1185 ],
Austin Schuh4ac96a82019-08-14 20:24:23 -07001186)
James Kuszmaul7daef362019-12-31 18:28:17 -08001187
Adam Snaider770b97b2023-08-04 21:07:48 -07001188load("@crate_index//:defs.bzl", "crate_repositories")
1189
1190crate_repositories()
1191
Adam Snaiderb8097452023-07-10 23:18:26 -04001192load("@rules_rust//tools/rust_analyzer:deps.bzl", "rust_analyzer_dependencies")
1193
1194rust_analyzer_dependencies()
1195
1196register_toolchains(rust_analyzer_toolchain_repository(
1197 name = "rust_analyzer_toolchain",
1198 version = RUST_VERSION,
1199))
1200
Adam Snaider770b97b2023-08-04 21:07:48 -07001201http_archive(
1202 name = "cxxbridge-cmd",
1203 build_file = "//third_party/cargo:cxxbridge-cmd/include.BUILD.bazel",
1204 sha256 = "df13eece12ed9e7bd4fb071a6af4c44421bb9024d339d029f5333bcdaca00000",
1205 strip_prefix = "cxxbridge-cmd-1.0.100",
1206 type = "tar.gz",
1207 urls = ["https://crates.io/api/v1/crates/cxxbridge-cmd/1.0.100/download"],
1208)
1209
1210crates_repository(
1211 name = "cxxbridge_cmd_deps",
1212 cargo_lockfile = "//third_party/cargo:cxxbridge-cmd/Cargo.lock",
1213 generator_sha256s = {"x86_64-unknown-linux-gnu": "1987a00e7ae12c705fa010b340410230ae8a47d7d95c02900191968b2e745649"},
1214 generator_urls = {
1215 "x86_64-unknown-linux-gnu": "https://software.frc971.org/Build-Dependencies/cargo-bazel-x86_64-unknown-linux-gnu",
1216 },
1217 lockfile = "//third_party/cargo:cxxbridge-cmd/Cargo.Bazel.lock",
1218 manifests = ["@cxxbridge-cmd//:Cargo.toml"],
1219 rust_toolchain_cargo_template = "@rust__{triple}__{channel}_tools//:bin/{tool}",
1220 rust_toolchain_rustc_template = "@rust__{triple}__{channel}_tools//:bin/{tool}",
1221 rust_version = "1.70.0",
1222 supported_platform_triples = [
1223 "x86_64-unknown-linux-gnu",
1224 "arm-unknown-linux-gnueabi",
1225 "armv7-unknown-linux-gnueabihf",
1226 "aarch64-unknown-linux-gnu",
1227 ],
1228)
1229
1230load("@cxxbridge_cmd_deps//:defs.bzl", cxxbridge_cmd_deps = "crate_repositories")
1231
1232cxxbridge_cmd_deps()
1233
James Kuszmaul7daef362019-12-31 18:28:17 -08001234http_file(
1235 name = "sample_logfile",
1236 downloaded_file_path = "log.fbs",
milind945708b2021-07-03 13:30:15 -07001237 sha256 = "45d1d19fb82786c476d3f21a8d62742abaeeedf4c16a00ec37ae350dcb61f1fc",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001238 urls = ["https://software.frc971.org/Build-Dependencies/small_sample_logfile2.fbs"],
James Kuszmaul7daef362019-12-31 18:28:17 -08001239)
Brian Silvermand4260c72020-01-14 00:08:02 -08001240
James Kuszmaul9c128122021-03-22 22:24:36 -07001241http_archive(
James Kuszmaul531609d2020-02-18 17:12:23 -08001242 name = "drivetrain_replay",
James Kuszmaul9c128122021-03-22 22:24:36 -07001243 build_file_content = """
1244filegroup(
1245 name = "drivetrain_replay",
1246 srcs = glob(["**/*.bfbs"]),
1247 visibility = ["//visibility:public"],
1248)
1249 """,
1250 sha256 = "115dcd2fe005cb9cad3325707aa7f4466390c43a08555edf331c06c108bdf692",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001251 url = "https://software.frc971.org/Build-Dependencies/2021-03-20_drivetrain_spin_wheels.tar.gz",
James Kuszmaul531609d2020-02-18 17:12:23 -08001252)
1253
milind-u7baf7342021-08-25 18:31:26 -07001254http_archive(
1255 name = "superstructure_replay",
1256 build_file_content = """
1257filegroup(
1258 name = "superstructure_replay",
1259 srcs = glob(["**/*.bfbs"]),
1260 visibility = ["//visibility:public"],
1261)
1262 """,
milind-u200b2762021-11-06 19:36:15 -07001263 sha256 = "2b9a3ecc83f2aba89a1909ae38fe51e6718a5b4d0e7c131846dfb2845df9cd19",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001264 url = "https://software.frc971.org/Build-Dependencies/2021-10-03_superstructure_shoot_balls.tar.gz",
milind-u7baf7342021-08-25 18:31:26 -07001265)
1266
Philipp Schradere2e27ff2024-02-25 22:08:55 -08001267http_file(
1268 name = "opencv_wasm",
1269 sha256 = "447244d0e67e411f91e7c225c07f104437104e3e753085248a0c527a25bd8807",
1270 urls = [
1271 "https://docs.opencv.org/4.9.0/opencv.js",
1272 ],
1273)
1274
Brian Silvermand97a47c2020-01-16 00:47:53 -08001275http_archive(
1276 name = "opencv_k8",
1277 build_file = "@//debian:opencv.BUILD",
Austin Schuhb7775c02023-06-02 18:12:02 -07001278 sha256 = "1d8f839fd135a700ca0576a503b15b0a198fef5b36f22efae5cae9eaa17935d1",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001279 url = "https://software.frc971.org/Build-Dependencies/opencv_amd64_v4.tar.gz",
Brian Silvermand97a47c2020-01-16 00:47:53 -08001280)
Brian Silverman764945b2020-01-16 23:40:43 -08001281
Brian Silverman764945b2020-01-16 23:40:43 -08001282http_archive(
1283 name = "halide_k8",
1284 build_file = "@//debian:halide.BUILD",
Austin Schuh669068e2023-01-04 20:50:34 -08001285 sha256 = "be3bdd067acb9ee0d37d0830821113cd69174bee46da466a836d8829fef7cf91",
1286 strip_prefix = "Halide-14.0.0-x86-64-linux/",
1287 url = "https://github.com/halide/Halide/releases/download/v14.0.0/Halide-14.0.0-x86-64-linux-6b9ed2afd1d6d0badf04986602c943e287d44e46.tar.gz",
Brian Silverman764945b2020-01-16 23:40:43 -08001288)
1289
Philipp Schraderf1bbf342022-02-05 14:30:15 -08001290http_archive(
1291 name = "halide_arm64",
1292 build_file = "@//debian:halide.BUILD",
Austin Schuh669068e2023-01-04 20:50:34 -08001293 sha256 = "cdd42411bcbba682f73d7db0af69837c4857ee90f1727c6feb37fc9a98132385",
1294 strip_prefix = "Halide-14.0.0-arm-64-linux/",
1295 url = "https://github.com/halide/Halide/releases/download/v14.0.0/Halide-14.0.0-arm-64-linux-6b9ed2afd1d6d0badf04986602c943e287d44e46.tar.gz",
Philipp Schraderf1bbf342022-02-05 14:30:15 -08001296)
1297
Brian Silverman764945b2020-01-16 23:40:43 -08001298http_archive(
Tyler Chatow60671d32020-02-26 19:49:30 -08001299 name = "gstreamer_k8",
1300 build_file = "@//debian:gstreamer.BUILD",
Austin Schuhb7775c02023-06-02 18:12:02 -07001301 sha256 = "09765cb1dd8abc643cb1dd91d536aef3e6604ff05f5f92898d508ed857455d0b",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001302 url = "https://software.frc971.org/Build-Dependencies/gstreamer_1.20.1-1~bpo11+1_amd64_v2.tar.gz",
Tyler Chatow60671d32020-02-26 19:49:30 -08001303)
1304
Brian Silvermanf59fe3f2020-09-22 21:04:09 -07001305# //debian:lzma_amd64
1306http_archive(
1307 name = "lzma_amd64",
1308 build_file_content = """
1309cc_library(
1310 name = "lib",
1311 srcs = [
1312 "usr/lib/x86_64-linux-gnu/liblzma.a",
1313 ],
1314 hdrs = glob([
1315 "usr/include/lzma/*.h",
1316 "usr/include/*.h",
1317 ]),
1318 strip_include_prefix = "usr/include",
1319 visibility = ["//visibility:public"],
1320)
1321""",
Austin Schuhe6751772022-06-27 00:58:26 -07001322 sha256 = "6fa0ad579b78bd41a0133024c34063b140442dd2ad4201fd2bf4c55229e7c13f",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001323 urls = ["https://software.frc971.org/Build-Dependencies/lzma_amd64-2.tar.gz"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -07001324)
1325
1326# //debian:lzma_arm64
1327http_archive(
1328 name = "lzma_arm64",
1329 build_file_content = """
1330cc_library(
1331 name = "lib",
1332 srcs = [
1333 "usr/lib/aarch64-linux-gnu/liblzma.a",
1334 ],
1335 hdrs = glob([
1336 "usr/include/lzma/*.h",
1337 "usr/include/*.h",
1338 ]),
1339 strip_include_prefix = "usr/include",
1340 visibility = ["//visibility:public"],
1341)
1342""",
Austin Schuhc020b182022-06-29 19:54:01 -07001343 sha256 = "b4ab9fd7cf3bfdb9e3fc67ac4a3c84db7f7e3c48431ccfc6e6e210f5829d17c9",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001344 urls = ["https://software.frc971.org/Build-Dependencies/lzma_arm64-2.tar.gz"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -07001345)
James Kuszmaul2cffe852021-10-27 20:17:49 -07001346
1347local_repository(
1348 name = "snappy",
1349 path = "third_party/snappy",
1350)
Philipp Schrader73e56602021-12-06 21:37:30 -08001351
1352http_archive(
1353 name = "io_bazel_rules_go",
Philipp Schrader039f5c32022-01-20 22:30:01 -08001354 patch_args = [
1355 "-p1",
1356 ],
1357 patches = [
1358 "@//third_party:rules_go/0001-Disable-warnings-for-external-repositories.patch",
1359 ],
Austin Schuh8f99c822024-05-05 22:43:40 -07001360 sha256 = "af47f30e9cbd70ae34e49866e201b3f77069abb111183f2c0297e7e74ba6bbc0",
Philipp Schrader73e56602021-12-06 21:37:30 -08001361 urls = [
Austin Schuh8f99c822024-05-05 22:43:40 -07001362 "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.0/rules_go-v0.47.0.zip",
1363 "https://github.com/bazelbuild/rules_go/releases/download/v0.47.0/rules_go-v0.47.0.zip",
Philipp Schrader73e56602021-12-06 21:37:30 -08001364 ],
1365)
1366
Philipp Schrader37fdbb62021-12-18 00:30:37 -08001367http_archive(
1368 name = "bazel_gazelle",
Philipp Schrader35bb1532023-03-05 13:49:12 -08001369 patch_args = [
1370 "-p1",
1371 ],
1372 patches = [
1373 "@//third_party:bazel-gazelle/0001-Fix-visibility-of-gazelle-runner.patch",
1374 ],
Austin Schuh8f99c822024-05-05 22:43:40 -07001375 sha256 = "75df288c4b31c81eb50f51e2e14f4763cb7548daae126817247064637fd9ea62",
Philipp Schrader37fdbb62021-12-18 00:30:37 -08001376 urls = [
Austin Schuh8f99c822024-05-05 22:43:40 -07001377 "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.36.0/bazel-gazelle-v0.36.0.tar.gz",
1378 "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.36.0/bazel-gazelle-v0.36.0.tar.gz",
Philipp Schrader37fdbb62021-12-18 00:30:37 -08001379 ],
1380)
1381
Philipp Schrader73e56602021-12-06 21:37:30 -08001382load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
1383
1384go_rules_dependencies()
1385
Philipp Schrader35bb1532023-03-05 13:49:12 -08001386go_register_toolchains(version = "1.19.5")
Philipp Schrader37fdbb62021-12-18 00:30:37 -08001387
1388load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
1389load("//:go_deps.bzl", "go_dependencies")
1390load("//tools/go:mirrored_go_deps.bzl", "mirrored_go_dependencies")
1391
1392mirrored_go_dependencies()
1393
1394# gazelle:repository_macro go_deps.bzl%go_dependencies
1395go_dependencies()
1396
1397gazelle_dependencies()
Philipp Schradercc016b32021-12-30 08:59:58 -08001398
1399http_archive(
Adam Snaider13d48d92023-08-03 12:20:15 -07001400 name = "com_google_protobuf",
Austin Schuh8f99c822024-05-05 22:43:40 -07001401 sha256 = "4fc5ff1b2c339fb86cd3a25f0b5311478ab081e65ad258c6789359cd84d421f8",
1402 strip_prefix = "protobuf-26.1",
1403 url = "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v26.1.tar.gz",
Adam Snaider13d48d92023-08-03 12:20:15 -07001404)
1405
1406http_archive(
1407 name = "com_github_grpc_grpc",
1408 patch_args = ["-p1"],
1409 patches = ["//debian:grpc.patch"],
Austin Schuh8f99c822024-05-05 22:43:40 -07001410 sha256 = "493d9905aa09124c2f44268b66205dd013f3925a7e82995f36745974e97af609",
1411 strip_prefix = "grpc-1.63.0",
1412 url = "https://github.com/grpc/grpc/archive/refs/tags/v1.63.0.tar.gz",
Adam Snaider13d48d92023-08-03 12:20:15 -07001413)
1414
1415load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
1416
1417grpc_deps()
1418
1419load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
1420
1421grpc_extra_deps()
1422
1423http_archive(
Philipp Schradercc016b32021-12-30 08:59:58 -08001424 name = "com_github_bazelbuild_buildtools",
1425 sha256 = "44a6e5acc007e197d45ac3326e7f993f0160af9a58e8777ca7701e00501c0857",
1426 strip_prefix = "buildtools-4.2.4",
1427 urls = [
1428 "https://github.com/bazelbuild/buildtools/archive/refs/tags/4.2.4.tar.gz",
1429 ],
1430)
Philipp Schrader0f5d2502022-03-08 22:44:55 -08001431
1432http_archive(
Austin Schuh94dbdf32024-04-11 22:51:09 -07001433 name = "clang_amd64_deps",
Tyler Chatow8a51ac62022-03-15 13:23:12 -07001434 build_file_content = """
Austin Schuh94dbdf32024-04-11 22:51:09 -07001435libs = [
1436 'lib/x86_64-linux-gnu/libtinfo.so.5',
1437 'lib/x86_64-linux-gnu/libtinfo.so.5.9',
1438 'usr/lib/x86_64-linux-gnu/libxml2.so.2',
1439 'usr/lib/x86_64-linux-gnu/libxml2.so.2.9.14',
1440 'usr/lib/x86_64-linux-gnu/libicuuc.so.72',
1441 'usr/lib/x86_64-linux-gnu/libicuuc.so.72.1',
1442 'usr/lib/x86_64-linux-gnu/libicudata.so.72',
1443 'usr/lib/x86_64-linux-gnu/libicudata.so.72.1',
1444]
1445exports_files(libs, ["//visibility:public"])
1446
1447filegroup(
1448 name = "all",
1449 srcs = libs,
1450 visibility = ["//visibility:public"],
Tyler Chatow8a51ac62022-03-15 13:23:12 -07001451)
1452""",
Austin Schuh94dbdf32024-04-11 22:51:09 -07001453 sha256 = "6ae7cbedd9b1d54da095d460e2832c2a3e2917fbfa2ed22c6787d4b527a5677d",
1454 urls = ["https://software.frc971.org/Build-Dependencies/clang_amd64.tar.gz"],
Tyler Chatow8a51ac62022-03-15 13:23:12 -07001455)
Tyler Chatowec100e22022-03-22 16:23:04 -07001456
1457http_archive(
1458 name = "libtinfo5_arm64",
1459 build_file_content = """
1460exports_files(
1461 [
1462 'lib/aarch64-linux-gnu/libtinfo.so.5',
1463 'lib/aarch64-linux-gnu/libtinfo.so.5.9',
1464 ],
1465 ["//visibility:public"],
1466)
1467""",
1468 patch_cmds = ["touch lib/aarch64-linux-gnu/BUILD"],
1469 sha256 = "df4ea5194c80df8d1f5f6ed68b47ce9dbf78aa8cdebbc61cf00654d9075f8e3c",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001470 urls = ["https://software.frc971.org/Build-Dependencies/libtinfo5_arm64.tar.gz"],
Tyler Chatowec100e22022-03-22 16:23:04 -07001471)
James Kuszmaul4ed5fb12022-03-22 15:20:04 -07001472
Philipp Schraderf60e7d72023-02-19 17:07:22 -08001473http_archive(
1474 name = "xvfb_amd64",
1475 build_file = "//third_party:xvfb/xvfb.BUILD",
1476 patch_cmds = [
1477 "unlink usr/bin/X11",
1478 ],
1479 sha256 = "a7491bf6c47ed0037992fa493f9c25af3ab00a695d706e1fdc122a8b798c0d7c",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001480 urls = ["https://software.frc971.org/Build-Dependencies/xvfb_amd64.tar.gz"],
Philipp Schraderf60e7d72023-02-19 17:07:22 -08001481)
1482
Austin Schuh86110712022-09-16 15:40:54 -07001483# https://curl.haxx.se/download/curl-7.69.1.tar.gz
1484http_archive(
1485 name = "com_github_curl_curl",
1486 build_file = "//debian:curl.BUILD",
1487 sha256 = "01ae0c123dee45b01bbaef94c0bc00ed2aec89cb2ee0fd598e0d302a6b5e0a98",
1488 strip_prefix = "curl-7.69.1",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001489 url = "https://software.frc971.org/Build-Dependencies/curl-7.69.1.tar.gz",
Austin Schuh86110712022-09-16 15:40:54 -07001490)
1491
1492http_archive(
Ajay Penmatcha57873d92023-12-18 12:59:21 -08001493 name = "com_github_nghttp2_nghttp2",
1494 build_file = "//debian:BUILD.nghttp2.bazel",
1495 sha256 = "7da19947b33a07ddcf97b9791331bfee8a8545e6b394275a9971f43cae9d636b",
1496 strip_prefix = "nghttp2-1.58.0",
1497 url = "https://github.com/nghttp2/nghttp2/archive/refs/tags/v1.58.0.tar.gz",
1498)
1499
1500http_archive(
Austin Schuh86110712022-09-16 15:40:54 -07001501 # No official name exists. Names used in our external dependencies include
1502 # zlib, madler_zlib, com_github_madler_zlib.
1503 name = "zlib",
1504 build_file = "//debian:BUILD.zlib.bazel",
1505 sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff",
1506 strip_prefix = "zlib-1.2.11",
1507 urls = [
1508 "https://github.com/madler/zlib/archive/v1.2.11.tar.gz",
1509 ],
1510)
1511
1512# This one is tricky to get an archive because it has recursive submodules. These semi-automated steps do work though:
Austin Schuh8f99c822024-05-05 22:43:40 -07001513# git clone -b 1.11.321 --recurse-submodules --depth=1 https://github.com/aws/aws-sdk-cpp
Austin Schuh86110712022-09-16 15:40:54 -07001514# cd aws-sdk-cpp
1515# echo bsdtar -a -cf aws_sdk-version.tar.gz --ignore-zeros @\<\(git archive HEAD\) $(git submodule foreach --recursive --quiet 'echo @\<\(cd $displaypath \&\& git archive HEAD --prefix=$displaypath/\)')
1516# Now run the command that printed, and the output will be at aws_sdk-version.tar.gz.
1517http_archive(
1518 name = "aws_sdk",
1519 build_file = "//debian:aws_sdk.BUILD",
Austin Schuh8f99c822024-05-05 22:43:40 -07001520 sha256 = "08856b91139d209f7423e60dd8f74a14ab6d053ca40088fcb42fd02484003e95",
1521 url = "https://software.frc971.org/Build-Dependencies/aws_sdk-1.11.321.tar.gz",
Austin Schuh86110712022-09-16 15:40:54 -07001522)
1523
James Kuszmaul5ab990d2022-11-07 16:35:49 -08001524# Source code of LZ4 (files under lib/) are under BSD 2-Clause.
1525# The rest of the repository (build information, documentation, etc.) is under GPLv2.
1526# We only care about the lib/ subfolder anyways, and strip out any other files.
1527http_archive(
1528 name = "com_github_lz4_lz4",
1529 build_file = "//debian:BUILD.lz4.bazel",
1530 sha256 = "0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b",
1531 strip_prefix = "lz4-1.9.4/lib",
1532 url = "https://github.com/lz4/lz4/archive/refs/tags/v1.9.4.tar.gz",
1533)
1534
James Kuszmaul5c56ed32022-03-30 15:10:07 -07001535http_file(
1536 name = "com_github_foxglove_mcap_mcap",
1537 executable = True,
James Kuszmaul5ab990d2022-11-07 16:35:49 -08001538 sha256 = "ae745dd09cf4c9570c1c038a72630c07b073f0ed4b05983d64108ff748a40d3f",
1539 urls = ["https://github.com/foxglove/mcap/releases/download/releases%2Fmcap-cli%2Fv0.0.22/mcap-linux-amd64"],
James Kuszmaul5c56ed32022-03-30 15:10:07 -07001540)
Brian Silverman0aa13732022-05-19 23:14:08 -07001541
1542http_archive(
James Kuszmaul0de4feb2022-04-15 12:16:59 -07001543 name = "com_github_zaphoyd_websocketpp",
1544 build_file = "//third_party/websocketpp:websocketpp.BUILD",
Ravago Jones0c74c122023-01-08 15:20:19 -08001545 patch_args = ["-p1"],
1546 patches = ["//third_party/websocketpp:websocketpp.patch"],
James Kuszmaul0de4feb2022-04-15 12:16:59 -07001547 sha256 = "6ce889d85ecdc2d8fa07408d6787e7352510750daa66b5ad44aacb47bea76755",
1548 strip_prefix = "websocketpp-0.8.2",
1549 url = "https://github.com/zaphoyd/websocketpp/archive/refs/tags/0.8.2.tar.gz",
1550)
1551
1552http_archive(
1553 name = "com_github_foxglove_ws-protocol",
James Kuszmaul6b609292023-01-28 15:58:43 -08001554 build_file = "//third_party/foxglove/ws_protocol:foxglove_ws_protocol.BUILD",
James Kuszmaul0de4feb2022-04-15 12:16:59 -07001555 patch_args = ["-p1"],
James Kuszmaul6b609292023-01-28 15:58:43 -08001556 patches = ["//third_party/foxglove/ws_protocol:foxglove_ws_protocol.patch"],
James Kuszmaul0de4feb2022-04-15 12:16:59 -07001557 sha256 = "3256f09a67419f6556778c443d332f1a4bf53ba0e7a464179bf838abffa366ab",
1558 strip_prefix = "ws-protocol-releases-typescript-ws-protocol-examples-v0.0.6",
1559 url = "https://github.com/foxglove/ws-protocol/archive/refs/tags/releases/typescript/ws-protocol-examples/v0.0.6.tar.gz",
1560)
1561
1562http_archive(
1563 name = "asio",
1564 build_file_content = """
1565cc_library(
1566 name = "asio",
1567 hdrs = glob(["include/asio/**/*.hpp", "include/asio/**/*.ipp", "include/asio.hpp"]),
1568 visibility = ["//visibility:public"],
1569 defines = ["ASIO_STANDALONE"],
1570 includes = ["include/"],
1571)""",
1572 sha256 = "8976812c24a118600f6fcf071a20606630a69afe4c0abee3b0dea528e682c585",
1573 strip_prefix = "asio-1.24.0",
1574 url = "https://downloads.sourceforge.net/project/asio/asio/1.24.0%2520%2528Stable%2529/asio-1.24.0.tar.bz2",
1575)
James Kuszmaul6b609292023-01-28 15:58:43 -08001576
1577http_archive(
1578 name = "com_github_foxglove_schemas",
1579 build_file = "//third_party/foxglove/schemas:schemas.BUILD",
1580 sha256 = "c0d08365eb8fba0af7773b5f0095fb53fb53f020bde46edaa308af5bb939fc15",
1581 strip_prefix = "schemas-7a3e077b88142ac46bb4e2616f83dc029b45352e/schemas/flatbuffer",
1582 url = "https://github.com/foxglove/schemas/archive/7a3e077b88142ac46bb4e2616f83dc029b45352e.tar.gz",
1583)
James Kuszmaul3398d0b2023-02-11 22:55:22 -08001584
1585# This contains the *compiled* foxglove studio. This can be reproduced by:
1586# 1. Cloning https://github.com/foxglove/studio
James Kuszmaul1e23b652024-02-21 21:10:02 -08001587# 2. Building the code (yarn install; yarn web:build:prod)
1588# 3. tar'ing the web/.webpack folder (e.g., tar czvf foxglove-1456f4a4cb6f4c6c7e50e020ba9918dba9e04b96.tar.gz --directory=web/.webpack/ .)
James Kuszmaul3398d0b2023-02-11 22:55:22 -08001589# These files can be hosted locally to provide an offline foxglove server.
1590# Foxglove may be served on any port and may be nested at a subpath
1591# (e.g., at hostname:8000/foxglove behind a proxy).
1592http_archive(
1593 name = "foxglove_studio",
1594 build_file_content = """
1595filegroup(
1596 name = "foxglove_studio",
1597 srcs = glob(["**"]),
1598 visibility = ["//visibility:public"],
1599)""",
James Kuszmaul1e23b652024-02-21 21:10:02 -08001600 sha256 = "d02f4ca629e6dcf2b65557a0353871ce0025e70715214de4e6ec7e9f862de420",
James Kuszmaul3398d0b2023-02-11 22:55:22 -08001601 url =
James Kuszmaul1e23b652024-02-21 21:10:02 -08001602 "https://software.frc971.org/Build-Dependencies/foxglove-1456f4a4cb6f4c6c7e50e020ba9918dba9e04b96.tar.gz",
James Kuszmaul3398d0b2023-02-11 22:55:22 -08001603)
Ravago Jones9c10b2a2023-02-06 12:41:59 -08001604
1605#
1606# https://www.st.com/en/embedded-software/stsw-img009.html#overview
1607http_archive(
1608 name = "vl53l1x_ultra_lite_driver_api",
1609 build_file = "//third_party/vl53l1x:vl53l1x.BUILD",
1610 patch_args = ["-p1"],
1611 patches = ["//third_party/vl53l1x:vl53l1x.patch"],
1612 sha256 = "06a66254ab7a8b061f93ff0f65abb6088c3ea50335475bb6ac11087beb65d174",
1613 strip_prefix = "en.STSW-IMG009_v3.5.2/API",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001614 url = "https://software.frc971.org/Build-Dependencies/en.STSW-IMG009.zip",
Ravago Jones9c10b2a2023-02-06 12:41:59 -08001615)
Yash Chainani10b7b022023-02-22 14:34:04 -08001616
1617http_archive(
1618 name = "apriltag_test_bfbs_images",
1619 build_file_content = """
1620filegroup(
1621 name = "apriltag_test_bfbs_images",
1622 srcs = glob(["**"]),
1623 visibility = ["//visibility:public"],
1624)""",
1625 sha256 = "2356b9d0b3be59d01e837bfbbee21de55b16232d5e00c66701c20b64ff3272e3",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001626 url = "https://software.frc971.org/Build-Dependencies/2023_arducam_apriltag_test_images.tar.gz",
Yash Chainani10b7b022023-02-22 14:34:04 -08001627)
Filip Kujawaa5e39702023-03-04 17:58:27 -08001628
Austin Schuh1fc51fa2024-01-01 12:34:00 -08001629http_file(
1630 name = "orin_image_apriltag",
1631 downloaded_file_path = "orin_image_apriltag.bfbs",
1632 sha256 = "c86604fd0b1301b301e299b1bba2573af8c586413934a386a2bd28fd9b037b84",
1633 url = "https://software.frc971.org/Build-Dependencies/orin_image_apriltag.bfbs",
1634)
1635
1636http_file(
1637 name = "orin_large_image_apriltag",
1638 downloaded_file_path = "orin_large_gs_apriltag.bfbs",
1639 sha256 = "d933adac0d6c205c574791060be73701ead05977ff5dd9f6f4eadb45817c3ccb",
1640 url = "https://software.frc971.org/Build-Dependencies/orin_large_gs_apriltag.bfbs",
1641)
1642
Maxwell Hendersonc123b7f2024-01-02 00:00:34 -08001643http_file(
1644 name = "orin_capture_24_04",
1645 downloaded_file_path = "orin_capture_24_04.bfbs",
1646 sha256 = "719edb1d1394c13c1b55d02cf35c277e1d4c2111f4eb4220b28addc08634488a",
1647 url = "https://software.frc971.org/Build-Dependencies/orin-capture-24-04-2024.02.14.bfbs",
1648)
1649
1650http_file(
1651 name = "orin_capture_24_04_side",
1652 downloaded_file_path = "orin_capture_24_04_side.bfbs",
1653 sha256 = "4747cc98f8794d6570cb12a3171d7984e358581914a28b43fb6bb8b9bd7a10ac",
1654 url = "https://software.frc971.org/Build-Dependencies/orin-capture-24-04-side-2024.02.17.bfbs",
1655)
1656
Filip Kujawaa5e39702023-03-04 17:58:27 -08001657http_archive(
1658 name = "libedgetpu",
1659 build_file = "//third_party:libedgetpu/libedgetpu.BUILD",
Filip Kujawa8c76e5d2023-04-08 16:20:27 -07001660 sha256 = "c900faf2c9ea9599fda60c3d03ac43d0d7b34119659c9e35638b81cd14354b57",
Filip Kujawaa5e39702023-03-04 17:58:27 -08001661 strip_prefix = "libedgetpu-bazel",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001662 url = "https://software.frc971.org/Build-Dependencies/libedgetpu-ddfa7bde33c23afd8c2892182faa3e5b4e6ad94e.tar.gz",
Filip Kujawaa5e39702023-03-04 17:58:27 -08001663)
1664
1665http_archive(
1666 name = "libtensorflowlite",
1667 build_file = "//third_party:libtensorflowlite/libtensorflowlite.BUILD",
Filip Kujawa8c76e5d2023-04-08 16:20:27 -07001668 sha256 = "a073dfddb3cb25113ba7eac6edb5569d0ae7988cad881d3f665e8ca0b8b85108",
Filip Kujawaa5e39702023-03-04 17:58:27 -08001669 strip_prefix = "tensorflow-bazel",
Maxwell Henderson7a93a652023-06-24 15:17:09 -07001670 url = "https://software.frc971.org/Build-Dependencies/tensorflow-a4dfb8d1a71385bd6d122e4f27f86dcebb96712d.tar.gz",
Filip Kujawaa5e39702023-03-04 17:58:27 -08001671)
Philipp Schrader119c3822023-03-07 19:49:58 -08001672
1673http_archive(
1674 name = "julia",
1675 build_file = "//third_party:julia/julia.BUILD",
1676 patch_cmds = [
1677 "echo 'LIB_SYMLINKS = {' > files.bzl",
Austin Schuh1e69d422023-06-25 16:57:01 -07001678 """find lib/ -type l -exec bash -c 'echo "\\"{}\\": \\"$(readlink {})\\","' \\; | sort >> files.bzl""",
Philipp Schrader119c3822023-03-07 19:49:58 -08001679 "echo '}' >> files.bzl",
1680 "echo 'LIBS = [' >> files.bzl",
Austin Schuh1e69d422023-06-25 16:57:01 -07001681 """find lib/ -type f -exec bash -c 'echo "\\"{}\\","' \\; | sort >> files.bzl""",
Philipp Schrader119c3822023-03-07 19:49:58 -08001682 "echo ']' >> files.bzl",
1683 ],
1684 sha256 = "e71a24816e8fe9d5f4807664cbbb42738f5aa9fe05397d35c81d4c5d649b9d05",
1685 strip_prefix = "julia-1.8.5",
1686 url = "https://julialang-s3.julialang.org/bin/linux/x64/1.8/julia-1.8.5-linux-x86_64.tar.gz",
1687)
Austin Schuhae856ca2023-11-18 14:04:00 -08001688
1689http_archive(
Austin Schuhae856ca2023-11-18 14:04:00 -08001690 name = "com_github_nvidia_cccl",
1691 build_file = "//third_party/cccl:cccl.BUILD",
1692 sha256 = "38160c628a9e32b7cd55553f299768f72b24074cc9c1a993ba40a177877b3421",
1693 strip_prefix = "cccl-931dc6793482c61edbc97b7a19256874fd264313",
1694 url = "https://github.com/NVIDIA/cccl/archive/931dc6793482c61edbc97b7a19256874fd264313.zip",
1695)
Austin Schuh686be392023-12-18 21:50:01 -08001696
1697# Hedron's Compile Commands Extractor for Bazel
1698# https://github.com/hedronvision/bazel-compile-commands-extractor
1699http_archive(
1700 name = "hedron_compile_commands",
Austin Schuh686be392023-12-18 21:50:01 -08001701
1702 # Replace the commit hash (daae6f40adfa5fdb7c89684cbe4d88b691c63b2d) in both places (below) with the latest (https://github.com/hedronvision/bazel-compile-commands-extractor/commits/main), rather than using the stale one here.
1703 # Even better, set up Renovate and let it do the work for you (see "Suggestion: Updates" in the README).
Ravago Jones3b4fd912023-03-18 13:35:17 -07001704 sha256 = "43451a32bf271e7ba4635a07f7996d535501f066c0fe8feab04fb0c91dd5986e",
1705 strip_prefix = "bazel-compile-commands-extractor-daae6f40adfa5fdb7c89684cbe4d88b691c63b2d",
Austin Schuh686be392023-12-18 21:50:01 -08001706 url = "https://github.com/hedronvision/bazel-compile-commands-extractor/archive/daae6f40adfa5fdb7c89684cbe4d88b691c63b2d.tar.gz",
1707 # When you first run this tool, it'll recommend a sha256 hash to put here with a message like: "DEBUG: Rule 'hedron_compile_commands' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = ..."
1708)
1709
1710load("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_setup")
1711
1712hedron_compile_commands_setup()
Jim Ostrowski68c321d2023-11-14 21:36:28 -08001713
1714http_archive(
1715 name = "calibrate_multi_cameras_data",
1716 build_file_content = """
1717filegroup(
1718 name = "calibrate_multi_cameras_data",
1719 srcs = glob(["**"]),
1720 visibility = ["//visibility:public"],
1721)""",
1722 sha256 = "b106b3b975d3cf3ad3fcd5e4be7409f6095e1d531346a90c4ad6bdb7da1d08a5",
1723 url = "https://software.frc971.org/Build-Dependencies/2023_calibrate_multi_cameras_data.tar.gz",
1724)
James Kuszmauld2098cb2024-01-14 17:32:03 -08001725
1726http_archive(
1727 name = "com_github_tartanllama_expected",
1728 build_file_content = """
1729cc_library(
1730 name = "com_github_tartanllama_expected",
1731 srcs = ["include/tl/expected.hpp"],
1732 includes = ["include"],
1733 visibility = ["//visibility:public"],
1734)""",
1735 sha256 = "1db357f46dd2b24447156aaf970c4c40a793ef12a8a9c2ad9e096d9801368df6",
1736 strip_prefix = "expected-1.1.0",
1737 url = "https://github.com/TartanLlama/expected/archive/refs/tags/v1.1.0.tar.gz",
1738)
Stephan Pleines50aa93d2024-05-18 12:13:17 -07001739
1740http_archive(
1741 name = "com_github_storypku_bazel_iwyu",
1742 integrity = "sha256-R/rVwWn3SveoC8lAcicw6MOfdTqLLkubpaljT4qHjJg=",
1743 strip_prefix = "bazel_iwyu-bb102395e553215abd66603bcdeb6e93c66ca6d7",
1744 urls = [
1745 "https://github.com/storypku/bazel_iwyu/archive/bb102395e553215abd66603bcdeb6e93c66ca6d7.zip",
1746 ],
1747)
1748
1749load("@com_github_storypku_bazel_iwyu//bazel:dependencies.bzl", "bazel_iwyu_dependencies")
1750
1751bazel_iwyu_dependencies()
Austin Schuhbb1338c2024-06-15 19:31:16 -07001752
1753http_archive(
1754 name = "m4_v1.4.18",
1755 build_file = "@//debian:m4.BUILD",
1756 sha256 = "ee8dfe664ac8c1d066bab64f71bd076a021875581b3cc47dac4a14a475f50b15",
1757 url = "http://software.frc971.org/Build-Dependencies/m4.tar.gz",
1758)
Austin Schuh1c619d52024-06-15 21:09:19 -07001759
1760http_archive(
1761 name = "symengine",
1762 build_file = "@//debian:symengine.BUILD",
1763 sha256 = "1b5c3b0bc6a9f187635f93585649f24a18e9c7f2167cebcd885edeaaf211d956",
1764 strip_prefix = "symengine-0.12.0",
Austin Schuh99f7c6a2024-06-25 22:07:44 -07001765 url = "https://github.com/symengine/symengine/releases/download/v0.12.0/symengine-0.12.0.tar.gz",
1766)
1767
1768http_archive(
1769 name = "com_google_tcmalloc",
1770 sha256 = "f11a004d7361ac6cd3e41fd573b08a92db28220934e8d4c82344ce0aeb20d1e4",
1771 strip_prefix = "tcmalloc-6c3e8bf43de02934525b3760571ca8781dca1869",
1772 url = "https://github.com/google/tcmalloc/archive/6c3e8bf43de02934525b3760571ca8781dca1869.zip",
Austin Schuh1c619d52024-06-15 21:09:19 -07001773)