blob: a4d4406e69637e70fcfdf1bd7adabc453faf5571 [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",
14 sha256 = "2c8d8347427e6bb0ba7cf9f933c08fe2be2b62ff2454546ad852f7bf267aad87",
15 strip_prefix = "platforms-e658a6af526089406d0057160542597501ba65d7",
16 url = "https://github.com/bazelbuild/platforms/archive/e658a6af526089406d0057160542597501ba65d7.zip",
17)
18
19http_archive(
20 name = "bazel_skylib",
21 sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
22 urls = [
23 "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
24 "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
25 ],
26)
27
28http_archive(
Philipp Schrader55dd6b42023-02-22 20:44:23 -080029 name = "aspect_bazel_lib",
30 sha256 = "80897b673c2b506d21f861ae316689aa8abcc3e56947580a41bf9e68ff13af58",
31 strip_prefix = "bazel-lib-1.27.1",
32 url = "https://github.com/aspect-build/bazel-lib/releases/download/v1.27.1/bazel-lib-v1.27.1.tar.gz",
33)
34
35load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies")
36
37aspect_bazel_lib_dependencies()
38
39http_archive(
Philipp Schrader9670a2a2023-01-11 01:20:16 -080040 name = "rules_python",
41 patch_args = ["-p1"],
42 patches = [
43 "//third_party:rules_python/0001-Support-overriding-individual-packages.patch",
44 "//third_party:rules_python/0002-Allow-user-to-patch-wheels.patch",
45 ],
46 sha256 = "497ca47374f48c8b067d786b512ac10a276211810f4a580178ee9b9ad139323a",
47 strip_prefix = "rules_python-0.16.1",
48 url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.16.1.tar.gz",
49)
50
51load("@rules_python//python:repositories.bzl", "python_register_toolchains")
52
53python_register_toolchains(
54 name = "python3_9",
55 python_version = "3.9",
56 register_toolchains = False,
57)
58
James Kuszmaul9776b392023-01-14 14:08:08 -080059load(
60 "@python3_9//:defs.bzl",
61 python_interpreter = "interpreter",
62)
Philipp Schrader9670a2a2023-01-11 01:20:16 -080063load("@rules_python//python:pip.bzl", "pip_parse")
James Kuszmaul9776b392023-01-14 14:08:08 -080064load(
65 "//tools/python:package_annotations.bzl",
66 PYTHON_ANNOTATIONS = "ANNOTATIONS",
67)
Philipp Schrader9670a2a2023-01-11 01:20:16 -080068
69pip_parse(
70 name = "pip_deps",
71 annotations = PYTHON_ANNOTATIONS,
72 enable_implicit_namespace_pkgs = True,
73 overrides = "//tools/python:whl_overrides.json",
74 patch_spec = "//tools/python:patches.json",
75 python_interpreter_target = python_interpreter,
76 require_overrides = RUNNING_IN_CI,
77 requirements_lock = "//tools/python:requirements.lock.txt",
78)
79
80# Load the starlark macro which will define your dependencies.
James Kuszmaul9776b392023-01-14 14:08:08 -080081load(
82 "@pip_deps//:requirements.bzl",
83 install_pip_deps = "install_deps",
84)
Philipp Schrader9670a2a2023-01-11 01:20:16 -080085
86install_pip_deps()
87
88load("//tools/python:repo_defs.bzl", "pip_configure")
89
90pip_configure(
91 name = "pip",
92)
93
94http_archive(
95 name = "rules_pkg",
96 patch_args = ["-p1"],
97 patches = [
98 "//third_party:rules_pkg/0001-Fix-tree-artifacts.patch",
99 ],
100 sha256 = "62eeb544ff1ef41d786e329e1536c1d541bb9bcad27ae984d57f18f314018e66",
101 urls = [
102 "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.6.0/rules_pkg-0.6.0.tar.gz",
103 "https://github.com/bazelbuild/rules_pkg/releases/download/0.6.0/rules_pkg-0.6.0.tar.gz",
104 ],
105)
106
107load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
108
109rules_pkg_dependencies()
110
Brian Silverman7bda6212018-08-05 11:42:11 -0700111load(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800112 "//debian:apache2.bzl",
113 apache2_debs = "files",
114)
115load(
Philipp Schrader41011a12022-03-13 12:49:32 -0700116 "//debian:postgresql_amd64.bzl",
117 postgresql_amd64_debs = "files",
118)
119load(
Brian Silverman7bda6212018-08-05 11:42:11 -0700120 "//debian:patch.bzl",
121 patch_debs = "files",
122)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700123load(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700124 "//debian:rsync.bzl",
125 rsync_debs = "files",
126)
127load(
128 "//debian:ssh.bzl",
129 ssh_debs = "files",
130)
131load(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700132 "//debian:pandoc.bzl",
133 pandoc_debs = "files",
134)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700135load(
136 "//debian:libusb.bzl",
137 libusb_debs = "files",
138)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700139load(
140 "//debian:mingw_compiler.bzl",
141 mingw_compiler_debs = "files",
142)
Brian Silverman6470f442018-08-05 12:08:16 -0700143load(
144 "//debian:patchelf.bzl",
145 patchelf_debs = "files",
146)
147load(
Brian Silverman50b9ac02018-08-12 13:24:10 -0700148 "//debian:arm_frc_gnueabi_deps.bzl",
149 arm_frc_gnueabi_deps_debs = "files",
150)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700151load(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700152 "//debian:gtk_runtime.bzl",
153 gtk_runtime_debs = "files",
154)
155load(
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800156 "//debian:opencv_arm64.bzl",
157 opencv_arm64_debs = "files",
158)
159load(
Brian Silvermand4260c72020-01-14 00:08:02 -0800160 "//debian:opencv_armhf.bzl",
161 opencv_armhf_debs = "files",
162)
Brian Silvermand97a47c2020-01-16 00:47:53 -0800163load(
164 "//debian:opencv_amd64.bzl",
165 opencv_amd64_debs = "files",
166)
Tyler Chatow60671d32020-02-26 19:49:30 -0800167load(
168 "//debian:gstreamer_amd64.bzl",
James Kuszmaulc91e4402020-05-10 18:47:20 -0700169 gstreamer_amd64_debs = "files",
Tyler Chatow60671d32020-02-26 19:49:30 -0800170)
171load(
172 "//debian:gstreamer_armhf.bzl",
James Kuszmaulc91e4402020-05-10 18:47:20 -0700173 gstreamer_armhf_debs = "files",
Tyler Chatow60671d32020-02-26 19:49:30 -0800174)
Austin Schuh023e7f52020-08-18 21:24:37 -0700175load(
Tyler Chatow6eda82c2022-03-27 22:37:38 -0700176 "//debian:gstreamer_arm64.bzl",
177 gstreamer_arm64_debs = "files",
178)
179load(
Austin Schuh023e7f52020-08-18 21:24:37 -0700180 "//debian:m4.bzl",
181 m4_debs = "files",
182)
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700183load(
184 "//debian:lzma_amd64.bzl",
185 lzma_amd64_debs = "files",
186)
187load(
188 "//debian:lzma_arm64.bzl",
189 lzma_arm64_debs = "files",
190)
Tyler Chatow8a51ac62022-03-15 13:23:12 -0700191load(
192 "//debian:libtinfo5_amd64.bzl",
193 libtinfo5_amd64_debs = "files",
194)
Tyler Chatowec100e22022-03-22 16:23:04 -0700195load(
196 "//debian:libtinfo5_arm64.bzl",
197 libtinfo5_arm64_debs = "files",
198)
Philipp Schraderf60e7d72023-02-19 17:07:22 -0800199load(
200 "//debian:xvfb_amd64.bzl",
201 xvfb_amd64_debs = "files",
202)
Philipp Schrader0e19c602018-03-07 21:07:22 -0800203load("//debian:packages.bzl", "generate_repositories_for_debs")
204
Austin Schuh71f6fa72019-08-31 18:23:02 -0700205generate_repositories_for_debs(rsync_debs)
206
207generate_repositories_for_debs(ssh_debs)
208
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800209generate_repositories_for_debs(apache2_debs)
210
Philipp Schrader41011a12022-03-13 12:49:32 -0700211generate_repositories_for_debs(postgresql_amd64_debs)
212
Brian Silverman7bda6212018-08-05 11:42:11 -0700213generate_repositories_for_debs(patch_debs)
214
Brian Silverman7297c0c2018-08-05 13:43:00 -0700215generate_repositories_for_debs(pandoc_debs)
216
Brian Silverman4f6ba442018-08-05 14:34:58 -0700217generate_repositories_for_debs(libusb_debs)
218
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700219generate_repositories_for_debs(mingw_compiler_debs)
220
Brian Silverman6470f442018-08-05 12:08:16 -0700221generate_repositories_for_debs(patchelf_debs)
222
Brian Silverman50b9ac02018-08-12 13:24:10 -0700223generate_repositories_for_debs(arm_frc_gnueabi_deps_debs)
224
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700225generate_repositories_for_debs(gtk_runtime_debs)
226
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800227generate_repositories_for_debs(opencv_arm64_debs)
228
Brian Silvermand4260c72020-01-14 00:08:02 -0800229generate_repositories_for_debs(opencv_armhf_debs)
230
Brian Silvermand97a47c2020-01-16 00:47:53 -0800231generate_repositories_for_debs(opencv_amd64_debs)
232
Tyler Chatow6eda82c2022-03-27 22:37:38 -0700233generate_repositories_for_debs(
234 gstreamer_amd64_debs,
235 base_url = "https://www.frc971.org/Build-Dependencies/gstreamer_bullseye_amd64_deps",
236)
Tyler Chatow60671d32020-02-26 19:49:30 -0800237
238generate_repositories_for_debs(gstreamer_armhf_debs)
239
Tyler Chatow6eda82c2022-03-27 22:37:38 -0700240generate_repositories_for_debs(
241 gstreamer_arm64_debs,
242 base_url = "https://www.frc971.org/Build-Dependencies/gstreamer_bullseye_arm64_deps",
243)
244
Austin Schuh023e7f52020-08-18 21:24:37 -0700245generate_repositories_for_debs(m4_debs)
246
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700247generate_repositories_for_debs(lzma_amd64_debs)
248
249generate_repositories_for_debs(lzma_arm64_debs)
250
Tyler Chatow8a51ac62022-03-15 13:23:12 -0700251generate_repositories_for_debs(libtinfo5_amd64_debs)
252
Tyler Chatowec100e22022-03-22 16:23:04 -0700253generate_repositories_for_debs(libtinfo5_arm64_debs)
254
Philipp Schraderf60e7d72023-02-19 17:07:22 -0800255generate_repositories_for_debs(xvfb_amd64_debs)
256
Brian Silvermanc0309a02022-01-01 23:57:03 -0800257local_repository(
258 name = "com_grail_bazel_toolchain",
259 path = "third_party/bazel-toolchain",
260)
261
Brian Silverman4c7235a2021-11-17 19:04:37 -0800262load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm", "llvm_toolchain")
263
264llvm_version = "13.0.0"
265
266llvm(
267 name = "llvm_k8",
268 distribution = "clang+llvm-%s-x86_64-linux-gnu-ubuntu-16.04.tar.xz" % llvm_version,
269 llvm_version = llvm_version,
270)
271
272llvm(
273 name = "llvm_armv7",
274 distribution = "clang+llvm-%s-armv7a-linux-gnueabihf.tar.xz" % llvm_version,
275 llvm_version = llvm_version,
276)
277
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800278llvm(
279 name = "llvm_aarch64",
280 distribution = "clang+llvm-%s-aarch64-linux-gnu.tar.xz" % llvm_version,
281 llvm_version = llvm_version,
282)
283
Brian Silverman4c7235a2021-11-17 19:04:37 -0800284llvm_conlyopts = [
285 "-std=gnu99",
286]
287
288llvm_copts = [
289 "-D__STDC_FORMAT_MACROS",
290 "-D__STDC_CONSTANT_MACROS",
291 "-D__STDC_LIMIT_MACROS",
292 "-D_FILE_OFFSET_BITS=64",
293 "-fmessage-length=100",
294 "-fmacro-backtrace-limit=0",
295 "-Wextra",
296 "-Wpointer-arith",
297 "-Wstrict-aliasing",
298 "-Wcast-qual",
299 "-Wcast-align",
300 "-Wwrite-strings",
301 "-Wtype-limits",
302 "-Wsign-compare",
303 "-Wformat=2",
304 "-Werror",
305 "-ggdb3",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800306]
307
308llvm_cxxopts = [
309 "-std=gnu++17",
310]
311
Brian Silverman1e7c8972022-02-03 23:15:41 -0800312llvm_opt_copts = [
313 "-DAOS_DEBUG=0",
314]
315
316llvm_fastbuild_copts = [
317 "-DAOS_DEBUG=0",
318]
319
Brian Silverman4c7235a2021-11-17 19:04:37 -0800320llvm_dbg_copts = [
321 "-DAOS_DEBUG=1",
322]
Brian Silvermanc0309a02022-01-01 23:57:03 -0800323
324llvm_toolchain(
325 name = "llvm_toolchain",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800326 additional_target_compatible_with = {
327 "linux-armv7": [
328 "@//tools/platforms/hardware:raspberry_pi",
329 ],
330 },
331 conlyopts = {
332 "linux-x86_64": llvm_conlyopts,
333 "linux-armv7": llvm_conlyopts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800334 "linux-aarch64": llvm_conlyopts,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800335 },
336 copts = {
337 "linux-x86_64": llvm_copts,
338 "linux-armv7": llvm_copts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800339 "linux-aarch64": llvm_copts,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800340 },
341 cxxopts = {
342 "linux-x86_64": llvm_cxxopts,
343 "linux-armv7": llvm_cxxopts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800344 "linux-aarch64": llvm_cxxopts,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800345 },
346 dbg_copts = {
347 "linux-x86_64": llvm_dbg_copts,
Brian Silverman1e7c8972022-02-03 23:15:41 -0800348 "linux-armv7": llvm_dbg_copts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800349 "linux-aarch64": llvm_dbg_copts,
Brian Silverman1e7c8972022-02-03 23:15:41 -0800350 },
351 fastbuild_copts = {
352 "linux-x86_64": llvm_fastbuild_copts,
353 "linux-armv7": llvm_fastbuild_copts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800354 "linux-aarch64": llvm_fastbuild_copts,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800355 },
356 llvm_version = llvm_version,
Brian Silverman1e7c8972022-02-03 23:15:41 -0800357 opt_copts = {
358 "linux-x86_64": llvm_opt_copts,
359 "linux-armv7": llvm_opt_copts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800360 "linux-aarch64": llvm_opt_copts,
Brian Silverman1e7c8972022-02-03 23:15:41 -0800361 },
Brian Silverman4c7235a2021-11-17 19:04:37 -0800362 standard_libraries = {
363 "linux-x86_64": "libstdc++-10",
364 "linux-armv7": "libstdc++-10",
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800365 "linux-aarch64": "libstdc++-10",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800366 },
367 static_libstdcxx = False,
Brian Silvermanc0309a02022-01-01 23:57:03 -0800368 sysroot = {
369 "linux-x86_64": "@amd64_debian_sysroot//:sysroot_files",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800370 "linux-armv7": "@armhf_debian_rootfs//:sysroot_files",
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800371 "linux-aarch64": "@arm64_debian_rootfs//:sysroot_files",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800372 },
373 target_toolchain_roots = {
374 "linux-x86_64": "@llvm_k8//",
375 "linux-armv7": "@llvm_armv7//",
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800376 "linux-aarch64": "@llvm_aarch64//",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800377 },
378 toolchain_roots = {
379 "linux-x86_64": "@llvm_k8//",
Tyler Chatow486ad3e2022-03-23 13:32:03 -0700380 "linux-aarch64": "@llvm_aarch64//",
Brian Silvermanc0309a02022-01-01 23:57:03 -0800381 },
382)
383
Brian Silverman4c7235a2021-11-17 19:04:37 -0800384load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
385
386llvm_register_toolchains()
387
Philipp Schraderdada1072020-11-24 11:34:46 -0800388register_toolchains(
Philipp Schraderdada1072020-11-24 11:34:46 -0800389 "//tools/cpp:cc-toolchain-roborio",
390 "//tools/cpp:cc-toolchain-cortex-m4f",
Austin Schuh0a96ea32022-01-01 22:29:30 -0800391 "//tools/cpp:cc-toolchain-rp2040",
Philipp Schraderdada1072020-11-24 11:34:46 -0800392 # Find a good way to select between these two M4F toolchains.
393 #"//tools/cpp:cc-toolchain-cortex-m4f-k22",
Philipp Schraderf198a152021-12-05 09:18:23 -0800394 "//tools/python:python_toolchain",
Philipp Schrader73e56602021-12-06 21:37:30 -0800395 "//tools/go:noop_go_toolchain",
Brian Silverman847121b2022-03-09 15:48:08 -0800396 "//tools/rust:rust-toolchain-x86",
397 "//tools/rust:rust-toolchain-armv7",
398 "//tools/rust:rust-toolchain-arm64",
Brian Silvermana8ad1af2022-07-23 16:05:12 -0700399 # TODO(Brian): Make this work. See the comment on
400 # //tools/platforms:linux_roborio for details.
401 #"//tools/rust:rust-toolchain-roborio",
Ravago Jones16809802021-11-18 20:40:03 -0800402 "//tools/rust:noop_rust_toolchain",
Philipp Schrader54047962022-02-16 21:05:11 -0800403 "//tools/ts:noop_node_toolchain",
Philipp Schraderdada1072020-11-24 11:34:46 -0800404)
405
Austin Schuhf093fa52019-06-23 20:47:23 -0700406http_archive(
Austin Schuh7466fe12020-12-29 23:01:47 -0800407 name = "com_github_stevengj_nlopt",
408 build_file = "@//debian:nlopt.BUILD",
409 patch_args = ["-p1"],
410 patches = ["//debian:nlopt.patch"],
411 sha256 = "2d65815b21c30813499fe19c63947f7da56b10c0d4a459dce05417899b43e461",
412 strip_prefix = "nlopt-496be736b8b249273838b891f4c8ca3669551127",
413 url = "https://www.frc971.org/Build-Dependencies/nlopt-496be736b8b249273838b891f4c8ca3669551127.zip",
414)
415
James Kuszmaul203bfc22023-01-13 22:37:06 -0800416http_archive(
Austin Schuhd57edc42019-09-21 17:52:38 -0700417 name = "com_google_absl",
James Kuszmaul203bfc22023-01-13 22:37:06 -0800418 patch_args = ["-p1"],
419 patches = ["//third_party/abseil:abseil.patch"],
420 sha256 = "91209b5eecd9c3d862b230fefbc2728c7f2764ff6d5866ec398d48db1aaa1e90",
421 strip_prefix = "abseil-cpp-bb63a76710554cebbeb20306739a7b832be38c4a",
422 url = "https://github.com/abseil/abseil-cpp/archive/bb63a76710554cebbeb20306739a7b832be38c4a.zip",
Austin Schuh36244a12019-09-21 17:52:38 -0700423)
424
Alex Perrycb7da4b2019-08-28 19:35:56 -0700425local_repository(
426 name = "org_tuxfamily_eigen",
427 path = "third_party/eigen",
428)
429
James Kuszmaulbc02ff42021-01-15 20:41:30 -0800430local_repository(
431 name = "com_github_rawrtc_re",
432 path = "third_party/rawrtc/re",
433)
434
435local_repository(
436 name = "com_github_rawrtc_rew",
437 path = "third_party/rawrtc/rew",
438)
439
440local_repository(
441 name = "com_github_rawrtc_usrsctp",
442 path = "third_party/rawrtc/usrsctp",
443)
444
445local_repository(
446 name = "com_github_rawrtc_rawrtc_common",
447 path = "third_party/rawrtc/rawrtc-common",
448)
449
450local_repository(
451 name = "com_github_rawrtc_rawrtc_data_channel",
452 path = "third_party/rawrtc/rawrtc-data-channel",
453)
454
455local_repository(
456 name = "com_github_rawrtc_rawrtc",
457 path = "third_party/rawrtc/rawrtc",
458)
459
Austin Schuh0ca51f32020-12-25 21:51:45 -0800460http_archive(
461 name = "boringssl",
462 patch_args = ["-p1"],
463 patches = ["//debian:boringssl.patch"],
464 sha256 = "bcab08a22c28f5322316542aa2c3a9ef0a9f9fde9be22d489cee574867b24675",
465 strip_prefix = "boringssl-613fe9dbe74b58d6aaaf0d22fe57dccd964c7413",
466 urls = ["https://www.frc971.org/Build-Dependencies/boringssl-613fe9dbe74b58d6aaaf0d22fe57dccd964c7413.zip"],
467)
468
Austin Schuh36244a12019-09-21 17:52:38 -0700469# C++ rules for Bazel.
470http_archive(
471 name = "rules_cc",
Austin Schuh968174a2021-03-31 20:04:01 -0700472 sha256 = "ed36cc7a6f46b7c28ab4009db4a37e350e1ba367446b0886bcc9cdc1df92752e",
473 strip_prefix = "rules_cc-608c7b605fb844a20e96a3eddc9b49ad2542adab",
Austin Schuh36244a12019-09-21 17:52:38 -0700474 urls = [
Austin Schuh968174a2021-03-31 20:04:01 -0700475 "https://www.frc971.org/Build-Dependencies/rules_cc-608c7b605fb844a20e96a3eddc9b49ad2542adab.zip",
Austin Schuh36244a12019-09-21 17:52:38 -0700476 ],
477)
Austin Schuhd57edc42019-09-21 17:52:38 -0700478
Austin Schuh4759ffc2015-10-07 20:39:56 -0700479new_local_repository(
Brian Silverman7bda6212018-08-05 11:42:11 -0700480 name = "usr_repo",
Austin Schuhf093fa52019-06-23 20:47:23 -0700481 build_file = "@//debian:usr.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700482 path = "/usr",
Austin Schuh4759ffc2015-10-07 20:39:56 -0700483)
484
Austin Schuh1f9aeb42015-11-12 23:34:49 -0800485new_git_repository(
Brian Silverman7bda6212018-08-05 11:42:11 -0700486 name = "slycot_repo",
Tyler Chatow2584bb12018-10-27 20:48:35 -0700487 build_file = "@//debian:slycot.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700488 commit = "5af5f283cb23cbe23c4dfea4d5e56071bdbd6e70",
489 remote = "https://github.com/avventi/Slycot.git",
Austin Schuh1f9aeb42015-11-12 23:34:49 -0800490)
491
James Kuszmaul9776b392023-01-14 14:08:08 -0800492# TODO(Ravago, Max, Alex): https://github.com/wpilibsuite/opensdk
Austin Schuhf093fa52019-06-23 20:47:23 -0700493http_archive(
Brian Silverman7bda6212018-08-05 11:42:11 -0700494 name = "arm_frc_linux_gnueabi_repo",
Austin Schuhf093fa52019-06-23 20:47:23 -0700495 build_file = "@//tools/cpp/arm-frc-linux-gnueabi:arm-frc-linux-gnueabi.BUILD",
Austin Schuhe991fe22020-11-18 16:53:39 -0800496 patches = ["//debian:fts.patch"],
James Kuszmaul9776b392023-01-14 14:08:08 -0800497 sha256 = "f53c6b86c25b4827d50365efe760a08edfea39c027dd08674ae696c9093d6a37",
498 strip_prefix = "roborio-academic",
499 url = "https://www.frc971.org/Build-Dependencies/cortexa9_vfpv3-roborio-academic-2023-x86_64-linux-gnu-Toolchain-12.1.0.tgz",
Austin Schuh55139fe2015-10-14 23:55:24 -0700500)
Austin Schuhe456f152015-11-27 13:44:39 -0800501
Brian Silverman4c7235a2021-11-17 19:04:37 -0800502# The main partition from https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-lite.zip.sig
503# The following files and folders are removed to make bazel happy with it:
Brian Silvermanbf4c1312020-01-12 11:35:45 -0800504# usr/share/ca-certificates
Brian Silverman4c7235a2021-11-17 19:04:37 -0800505# lib/systemd/system/system-systemd\\x2dcryptsetup.slice
Brian Silvermanbf4c1312020-01-12 11:35:45 -0800506http_archive(
507 name = "armhf_debian_rootfs",
Brian Silverman60606c92020-01-15 22:45:04 -0800508 build_file = "@//:compilers/debian_rootfs.BUILD",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800509 sha256 = "734f26a0cfc943cc3cae88412536186adfc4ed148cc167e6ffb298497c686280",
510 url = "https://www.frc971.org/Build-Dependencies/2021-10-30-raspios-bullseye-armhf-lite_rootfs.tar.bz2",
Brian Silvermanbf4c1312020-01-12 11:35:45 -0800511)
512
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800513# The main partition from https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-lite.zip.sig
514# The following files and folders are removed to make bazel happy with it:
515# usr/share/ca-certificates
516# lib/systemd/system/system-systemd\\x2dcryptsetup.slice
517http_archive(
518 name = "arm64_debian_rootfs",
519 build_file = "@//:compilers/debian_rootfs.BUILD",
520 sha256 = "7e6ad432fec0a36f8b66c3fc2ab8795ea446e61f7dce7a206b55602677cf0904",
521 url = "https://www.frc971.org/Build-Dependencies/2021-10-30-raspios-bullseye-arm64-lite_rootfs.tar.bz2",
522)
523
Brian Silverman60606c92020-01-15 22:45:04 -0800524# Created with:
525# `debootstrap buster buster_sysroot`
526# and then chrooting in and running:
527# apt install libc6-dev libstdc++-7-dev
Brian Silverman4c7235a2021-11-17 19:04:37 -0800528# removing the apt cache,
Brian Silverman60606c92020-01-15 22:45:04 -0800529# and then tarring up the result
530http_archive(
531 name = "amd64_debian_sysroot",
532 build_file = "@//:compilers/debian_rootfs.BUILD",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800533 sha256 = "5e10f4cac85a98a39da1716b218bc05fff4666c61cc471a7df27876710bc86d2",
534 url = "https://www.frc971.org/Build-Dependencies/2022-01-06-debian-bullseye_rootfs.tar.bz2",
Brian Silverman60606c92020-01-15 22:45:04 -0800535)
536
Brian Silverman16a923c2018-10-31 19:40:51 -0700537local_repository(
538 name = "com_github_gflags_gflags",
539 path = "third_party/gflags",
540)
541
Brian Silverman82a12b92019-01-19 21:52:10 -0800542# Generated with:
Austin Schuh9950f682021-11-06 15:27:58 -0700543# git fetch https://github.com/wpilibsuite/ni-libraries main
Austin Schuhd3c72912022-02-22 18:05:32 -0800544# git archive --output=allwpilib_ni-libraries_776db4e8aed31a651fa2f590e7468c69b384b42a.tar.gz --format=tar.gz 776db4e8aed31a651fa2f590e7468c69b384b42a
Austin Schuhf093fa52019-06-23 20:47:23 -0700545http_archive(
James Kuszmaulc9c46b32019-12-08 21:10:00 -0800546 name = "allwpilib_ni_libraries",
547 build_file = "@//debian:ni-libraries.BUILD",
James Kuszmaul9776b392023-01-14 14:08:08 -0800548 sha256 = "c5d03ce5ed3807d9c4a5d415d8123d9ab3479498428eb0f1d77e74891f107aa0",
549 strip_prefix = "ni-libraries-2023.3.0",
550 url = "https://github.com/wpilibsuite/ni-libraries/archive/refs/tags/v2023.3.0.zip",
Brian Silverman82a12b92019-01-19 21:52:10 -0800551)
552
Brian Silverman3fca9d72016-02-20 02:32:51 -0500553# For protobuf. Don't use these.
554bind(
Brian Silverman7bda6212018-08-05 11:42:11 -0700555 name = "six",
Philipp Schrader01535ee2023-01-08 13:19:03 -0800556 actual = "@pip//six",
Brian Silverman3fca9d72016-02-20 02:32:51 -0500557)
Brian Silverman7bda6212018-08-05 11:42:11 -0700558
Brian Silverman3fca9d72016-02-20 02:32:51 -0500559bind(
Brian Silverman7bda6212018-08-05 11:42:11 -0700560 name = "gtest",
James Kuszmaul3aabc1c2023-01-13 21:33:43 -0800561 actual = "@com_google_googletest//:gtest",
Brian Silverman3fca9d72016-02-20 02:32:51 -0500562)
Brian Silverman7bda6212018-08-05 11:42:11 -0700563
Brian Silverman3fca9d72016-02-20 02:32:51 -0500564bind(
Brian Silverman7bda6212018-08-05 11:42:11 -0700565 name = "gtest_main",
James Kuszmaul3aabc1c2023-01-13 21:33:43 -0800566 actual = "@com_google_googletest//:gtest_main",
Brian Silverman3fca9d72016-02-20 02:32:51 -0500567)
568
James Kuszmaul59a308f2023-01-28 19:14:07 -0800569http_archive(
570 name = "april_tag_test_image",
571 build_file_content = """
572filegroup(
573 name = "april_tag_test_image",
574 srcs = ["test.bfbs", "expected.jpeg", "expected.png"],
575 visibility = ["//visibility:public"],
576)""",
577 sha256 = "5312c79b19e9883b3cebd9d65b4438a2bf05b41da0bcd8c35e19d22c3b2e1859",
578 urls = ["https://www.frc971.org/Build-Dependencies/test_image_frc971.vision.CameraImage_2023.01.28.tar.gz"],
579)
580
Brian Silverman4aa83042018-01-05 12:47:31 -0800581# Recompressed from libusb-1.0.21.7z.
582http_file(
Brian Silverman7bda6212018-08-05 11:42:11 -0700583 name = "libusb_1_0_windows",
Austin Schuh4ac96a82019-08-14 20:24:23 -0700584 downloaded_file_path = "libusb-1.0.21-windows.tar.xz",
Brian Silverman7bda6212018-08-05 11:42:11 -0700585 sha256 = "fc2ba03992f343aabbaf9eb90559c6e00cdc6a2bd914d7cebea85857d5244015",
Austin Schuha5778ae2020-10-21 21:15:35 -0700586 urls = ["https://www.frc971.org/Build-Dependencies/libusb-1.0.21-windows.tar.xz"],
Brian Silverman4aa83042018-01-05 12:47:31 -0800587)
Brian Silvermand3ad1652018-02-18 22:16:29 -0500588
589# The data tarball of the same-named Debian package.
Austin Schuhf093fa52019-06-23 20:47:23 -0700590http_archive(
Brian Silvermand3ad1652018-02-18 22:16:29 -0500591 name = "f2c",
Austin Schuhf093fa52019-06-23 20:47:23 -0700592 build_file = "@//debian:f2c.BUILD",
Brian Silvermand3ad1652018-02-18 22:16:29 -0500593 sha256 = "2c677437f8217a2e2b23e41b33995d0571644fc1bea46de858f8913a5053e3f4",
Austin Schuha5778ae2020-10-21 21:15:35 -0700594 url = "https://www.frc971.org/Build-Dependencies/f2c_20100827-1_amd64.xz.tar.xz",
Brian Silvermand3ad1652018-02-18 22:16:29 -0500595)
596
597# Downloaded from http://www.netlib.org/clapack/.
Austin Schuhf093fa52019-06-23 20:47:23 -0700598http_archive(
Brian Silverman7bda6212018-08-05 11:42:11 -0700599 name = "clapack",
Austin Schuhf093fa52019-06-23 20:47:23 -0700600 build_file = "@//debian:clapack.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700601 sha256 = "6dc4c382164beec8aaed8fd2acc36ad24232c406eda6db462bd4c41d5e455fac",
602 strip_prefix = "CLAPACK-3.2.1/",
Austin Schuha5778ae2020-10-21 21:15:35 -0700603 url = "https://www.frc971.org/Build-Dependencies/clapack-3.2.1.tgz",
Brian Silverman7bda6212018-08-05 11:42:11 -0700604)
605
Austin Schuhf093fa52019-06-23 20:47:23 -0700606http_archive(
Philipp Schrader41011a12022-03-13 12:49:32 -0700607 name = "postgresql_amd64",
608 build_file = "@//debian:postgresql_amd64.BUILD",
609 sha256 = "2b8bb77deaf58f798c296ce31ee7a32781395d55e05dcddc8a7da7e827f38d7f",
610 url = "https://www.frc971.org/Build-Dependencies/postgresql_amd64.tar.gz",
611)
612
613http_archive(
Brian Silverman7bda6212018-08-05 11:42:11 -0700614 name = "patch",
Austin Schuhf093fa52019-06-23 20:47:23 -0700615 build_file = "@//debian:patch.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700616 sha256 = "b5ce139648a2e04f5585948ddad2fdae24dd4ee7976ac5a22d6ae7bd5674631e",
Austin Schuha5778ae2020-10-21 21:15:35 -0700617 url = "https://www.frc971.org/Build-Dependencies/patch.tar.gz",
Brian Silvermand3ad1652018-02-18 22:16:29 -0500618)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700619
Austin Schuhf093fa52019-06-23 20:47:23 -0700620http_archive(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700621 name = "rsync",
622 build_file = "@//debian:rsync.BUILD",
623 sha256 = "53be65a9214aaa6d1b9176f135184fb4a78ccefd58f95ce0da37e6a392dfeb60",
Austin Schuha5778ae2020-10-21 21:15:35 -0700624 url = "https://www.frc971.org/Build-Dependencies/rsync.tar.gz",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700625)
626
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800627# //debian:ssh
Austin Schuh71f6fa72019-08-31 18:23:02 -0700628http_archive(
629 name = "ssh",
630 build_file = "@//debian:ssh.BUILD",
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800631 sha256 = "470fdc1252a2133a9d3c3da778e892a5b88f04f402cb04d8eb1cff7853242034",
Austin Schuha5778ae2020-10-21 21:15:35 -0700632 url = "https://www.frc971.org/Build-Dependencies/ssh_v3.tar.gz",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700633)
634
635http_archive(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800636 name = "apache2",
637 build_file = "@//debian:apache2.BUILD",
638 sha256 = "98b0ad6d911751ba0aa486429e6278f995e7bbabd928c7d3d44c888fa2bf371b",
639 url = "https://www.frc971.org/Build-Dependencies/apache2.tar.gz",
640)
641
642http_archive(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700643 name = "pandoc",
Austin Schuhf093fa52019-06-23 20:47:23 -0700644 build_file = "@//debian:pandoc.BUILD",
Brian Silverman7297c0c2018-08-05 13:43:00 -0700645 sha256 = "9f7a7adb3974a1f14715054c349ff3edc2909e920dbe3438fca437a83845f3c4",
Austin Schuha5778ae2020-10-21 21:15:35 -0700646 url = "https://www.frc971.org/Build-Dependencies/pandoc.tar.gz",
Brian Silverman7297c0c2018-08-05 13:43:00 -0700647)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700648
Austin Schuhf093fa52019-06-23 20:47:23 -0700649http_archive(
Brian Silverman4f6ba442018-08-05 14:34:58 -0700650 name = "libusb",
Austin Schuhf093fa52019-06-23 20:47:23 -0700651 build_file = "@//debian:libusb.BUILD",
Brian Silverman4f6ba442018-08-05 14:34:58 -0700652 sha256 = "3ca5cc2d317226f6646866ff9e8c443db3b0f6c82f828e800240982727531590",
Austin Schuha5778ae2020-10-21 21:15:35 -0700653 url = "https://www.frc971.org/Build-Dependencies/libusb.tar.gz",
Brian Silverman4f6ba442018-08-05 14:34:58 -0700654)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700655
Austin Schuhf093fa52019-06-23 20:47:23 -0700656http_archive(
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700657 name = "mingw_compiler",
Austin Schuhf093fa52019-06-23 20:47:23 -0700658 build_file = "@//debian:mingw_compiler.BUILD",
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700659 sha256 = "45e86a8460f2151a4f0306e7ae7b06761029d2412ee16f63d1e8d2d29354e378",
Austin Schuha5778ae2020-10-21 21:15:35 -0700660 url = "https://www.frc971.org/Build-Dependencies/mingw_compiler.tar.gz",
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700661)
Brian Silverman6470f442018-08-05 12:08:16 -0700662
Austin Schuhf093fa52019-06-23 20:47:23 -0700663http_archive(
Brian Silverman6470f442018-08-05 12:08:16 -0700664 name = "patchelf",
Austin Schuhf093fa52019-06-23 20:47:23 -0700665 build_file = "@//debian:patchelf.BUILD",
Brian Silverman6470f442018-08-05 12:08:16 -0700666 sha256 = "bf8b709909d7d9e30815dd228eeded7dc282e3ce3919d0589ccbb56ac8632abc",
Austin Schuha5778ae2020-10-21 21:15:35 -0700667 url = "https://www.frc971.org/Build-Dependencies/patchelf.tar.gz",
Brian Silverman6470f442018-08-05 12:08:16 -0700668)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700669
Austin Schuhf093fa52019-06-23 20:47:23 -0700670http_archive(
Brian Silverman50b9ac02018-08-12 13:24:10 -0700671 name = "arm_frc_gnueabi_deps",
Austin Schuhf093fa52019-06-23 20:47:23 -0700672 build_file = "@//debian:arm_frc_gnueabi_deps.BUILD",
Brian Silverman50b9ac02018-08-12 13:24:10 -0700673 sha256 = "4b26fe45010817dc136488ee1604ade21bd7c264c29f17d864fc6eba9d7442c4",
Austin Schuha5778ae2020-10-21 21:15:35 -0700674 url = "https://www.frc971.org/Build-Dependencies/arm_frc_gnueabi_deps.tar.gz",
Brian Silverman50b9ac02018-08-12 13:24:10 -0700675)
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700676
Austin Schuhf093fa52019-06-23 20:47:23 -0700677http_archive(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700678 name = "gtk_runtime",
679 build_file = "@//debian:gtk_runtime.BUILD",
Philipp Schrader7520ee62022-12-10 14:04:40 -0800680 sha256 = "5a6014d1783363be6bc95843d03bbb6513e650eaea60be2b1a4c65bf21981f9b",
681 url = "https://www.frc971.org/Build-Dependencies/gtk_runtime-4.tar.gz",
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700682)
683
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700684# Downloaded from
685# https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2?revision=bc2c96c0-14b5-4bb4-9f18-bceb4050fee7?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Linux,7-2018-q2-update
Austin Schuhf093fa52019-06-23 20:47:23 -0700686http_archive(
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700687 name = "gcc_arm_none_eabi",
Austin Schuhf093fa52019-06-23 20:47:23 -0700688 build_file = "@//:compilers/gcc_arm_none_eabi.BUILD",
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700689 sha256 = "bb17109f0ee697254a5d4ae6e5e01440e3ea8f0277f2e8169bf95d07c7d5fe69",
690 strip_prefix = "gcc-arm-none-eabi-7-2018-q2-update/",
Austin Schuha5778ae2020-10-21 21:15:35 -0700691 url = "https://www.frc971.org/Build-Dependencies/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2",
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700692)
Austin Schuhad596222018-01-31 23:34:03 -0800693
Tyler Chatowfba57822022-03-22 19:38:41 -0700694# Java11 JDK.
Philipp Schrader6efe5732022-02-12 15:11:13 -0800695remote_java_repository(
Austin Schuhe18baff2018-10-20 17:40:42 -0700696 name = "openjdk_linux_archive",
Philipp Schrader6efe5732022-02-12 15:11:13 -0800697 prefix = "openjdk",
Tyler Chatowfba57822022-03-22 19:38:41 -0700698 sha256 = "60e65d32e38876f81ddb623e87ac26c820465b637e263e8bed1acdecb4ca9be2",
699 strip_prefix = "zulu11.54.25-ca-jdk11.0.14.1-linux_x64",
Philipp Schrader9670a2a2023-01-11 01:20:16 -0800700 target_compatible_with = [
701 "@platforms//cpu:x86_64",
702 "@platforms//os:linux",
703 ],
Austin Schuhe18baff2018-10-20 17:40:42 -0700704 urls = [
Tyler Chatowfba57822022-03-22 19:38:41 -0700705 "https://www.frc971.org/Build-Dependencies/zulu11.54.25-ca-jdk11.0.14.1-linux_x64.tar.gz",
Austin Schuhe18baff2018-10-20 17:40:42 -0700706 ],
Tyler Chatowfba57822022-03-22 19:38:41 -0700707 version = "11",
708)
709
710remote_java_repository(
711 name = "openjdk_linux_archive_aarch64",
Tyler Chatowfba57822022-03-22 19:38:41 -0700712 prefix = "openjdk",
713 sha256 = "b0fb0bc303bb05b5042ef3d0939b9489f4a49a13a2d1c8f03c5d8ab23099454d",
714 strip_prefix = "zulu11.54.25-ca-jdk11.0.14.1-linux_aarch64",
Philipp Schrader9670a2a2023-01-11 01:20:16 -0800715 target_compatible_with = [
716 "@platforms//cpu:aarch64",
717 "@platforms//os:linux",
718 ],
Tyler Chatowfba57822022-03-22 19:38:41 -0700719 urls = [
720 "https://www.frc971.org/Build-Dependencies/zulu11.54.25-ca-jdk11.0.14.1-linux_aarch64.tar.gz",
721 ],
722 version = "11",
Austin Schuhe18baff2018-10-20 17:40:42 -0700723)
724
Austin Schuhf9724442018-10-28 20:30:21 -0700725local_repository(
726 name = "com_google_protobuf",
727 path = "third_party/protobuf",
Brian Silverman9c614bc2016-02-15 20:20:02 -0500728)
Austin Schuh10358f22019-01-21 20:25:11 -0800729
730local_repository(
731 name = "com_github_google_glog",
732 path = "third_party/google-glog",
733)
Austin Schuh6defdeb2019-01-21 21:00:30 -0800734
James Kuszmaul3aabc1c2023-01-13 21:33:43 -0800735http_archive(
Alex Perrycb7da4b2019-08-28 19:35:56 -0700736 name = "com_google_googletest",
James Kuszmaul3aabc1c2023-01-13 21:33:43 -0800737 patch_args = ["-p1"],
738 patches = ["//third_party/googletest:googletest.patch"],
739 sha256 = "5c6d595243de011f8ce8cc68050cc0490726786e80cdfd6555ebfe148d920407",
740 strip_prefix = "googletest-356fc301251378e0f6fa6aa794d73714202887ac",
741 urls = ["https://github.com/google/googletest/archive/356fc301251378e0f6fa6aa794d73714202887ac.zip"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700742)
743
Austin Schuh6defdeb2019-01-21 21:00:30 -0800744# External dependency: Google Benchmark; has no Bazel build.
James Kuszmaul38169b92023-01-13 21:17:05 -0800745http_archive(
Austin Schuh6defdeb2019-01-21 21:00:30 -0800746 name = "com_github_google_benchmark",
James Kuszmaul38169b92023-01-13 21:17:05 -0800747 patch_args = ["-p1"],
748 patches = ["//third_party/google-benchmark:benchmark.patch"],
749 sha256 = "6430e4092653380d9dc4ccb45a1e2dc9259d581f4866dc0759713126056bc1d7",
750 strip_prefix = "benchmark-1.7.1",
751 urls = ["https://github.com/google/benchmark/archive/refs/tags/v1.7.1.tar.gz"],
Austin Schuhcbc17402019-01-21 21:00:30 -0800752)
Austin Schuh033df092019-01-21 19:46:48 -0800753
754local_repository(
755 name = "com_google_ceres_solver",
756 path = "third_party/ceres",
Austin Schuh70cc9552019-01-21 19:46:48 -0800757)
Austin Schuhf6b94632019-02-02 22:11:27 -0800758
Austin Schuhf093fa52019-06-23 20:47:23 -0700759http_archive(
James Kuszmaul9776b392023-01-14 14:08:08 -0800760 name = "ctre_phoenixpro_api_cpp_headers",
761 build_file_content = """
762cc_library(
763 name = 'api-cpp',
764 visibility = ['//visibility:public'],
765 hdrs = glob(['ctre/phoenixpro/**/*.hpp', 'units/*.h']),
766 includes = ["."],
767 deps = ["@//third_party/allwpilib/wpimath"],
768)
769""",
Ravago Jones2060ee62023-02-03 18:12:24 -0800770 sha256 = "7ffc54bf40814a5c101ea3159af15215f15087298cfc2ae65826f987ccf65499",
James Kuszmaul9776b392023-01-14 14:08:08 -0800771 urls = [
Ravago Jones2060ee62023-02-03 18:12:24 -0800772 "https://maven.ctr-electronics.com/release/com/ctre/phoenixpro/api-cpp/23.0.5/api-cpp-23.0.5-headers.zip",
James Kuszmaul9776b392023-01-14 14:08:08 -0800773 ],
774)
775
776http_archive(
777 name = "ctre_phoenixpro_api_cpp_athena",
778 build_file_content = """
779filegroup(
780 name = 'shared_libraries',
781 srcs = [
782 'linux/athena/shared/libCTRE_PhoenixPro.so',
783 ],
784 visibility = ['//visibility:public'],
785)
786
787cc_library(
788 name = 'api-cpp',
789 visibility = ['//visibility:public'],
790 srcs = ['linux/athena/shared/libCTRE_PhoenixPro.so'],
791 target_compatible_with = ['@//tools/platforms/hardware:roborio'],
792)
793""",
Ravago Jones2060ee62023-02-03 18:12:24 -0800794 sha256 = "1e8a487cb538388de437d04985512533a9dea79e6c56ee0f319c5eb80260fcab",
James Kuszmaul9776b392023-01-14 14:08:08 -0800795 urls = [
Ravago Jones2060ee62023-02-03 18:12:24 -0800796 "https://maven.ctr-electronics.com/release/com/ctre/phoenixpro/api-cpp/23.0.5/api-cpp-23.0.5-linuxathena.zip",
James Kuszmaul9776b392023-01-14 14:08:08 -0800797 ],
798)
799
800http_archive(
801 name = "ctre_phoenixpro_tools_headers",
802 build_file_content = """
803cc_library(
804 name = 'tools',
805 visibility = ['//visibility:public'],
806 hdrs = glob(['ctre/**/*.h', 'ctre/**/*.hpp']),
807)
808""",
Ravago Jones2060ee62023-02-03 18:12:24 -0800809 sha256 = "51c52dfce4c2491887a7b7380e2f17e93a4092b6ac9f60d716738447a8ebedd7",
James Kuszmaul9776b392023-01-14 14:08:08 -0800810 urls = [
Ravago Jones2060ee62023-02-03 18:12:24 -0800811 "https://maven.ctr-electronics.com/release/com/ctre/phoenixpro/tools/23.0.5/tools-23.0.5-headers.zip",
James Kuszmaul9776b392023-01-14 14:08:08 -0800812 ],
813)
814
815http_archive(
816 name = "ctre_phoenixpro_tools_athena",
817 build_file_content = """
818filegroup(
819 name = 'shared_libraries',
820 srcs = [
821 'linux/athena/shared/libCTRE_PhoenixTools.so',
822 ],
823 visibility = ['//visibility:public'],
824)
825
826cc_library(
827 name = 'tools',
828 visibility = ['//visibility:public'],
829 srcs = ['linux/athena/shared/libCTRE_PhoenixTools.so'],
830 target_compatible_with = ['@//tools/platforms/hardware:roborio'],
831)
832""",
Ravago Jones2060ee62023-02-03 18:12:24 -0800833 sha256 = "9fb137321745c1eff63bdcfe486806afb46ede11ea4d4c59461320845698cc1e",
James Kuszmaul9776b392023-01-14 14:08:08 -0800834 urls = [
Ravago Jones2060ee62023-02-03 18:12:24 -0800835 "https://maven.ctr-electronics.com/release/com/ctre/phoenixpro/tools/23.0.5/tools-23.0.5-linuxathena.zip",
James Kuszmaul9776b392023-01-14 14:08:08 -0800836 ],
837)
838
839http_archive(
James Kuszmaul02eb05e2019-12-22 12:32:18 -0800840 name = "ctre_phoenix_api_cpp_headers",
Austin Schuhf6b94632019-02-02 22:11:27 -0800841 build_file_content = """
842cc_library(
843 name = 'api-cpp',
844 visibility = ['//visibility:public'],
845 hdrs = glob(['ctre/phoenix/**/*.h']),
846)
847""",
James Kuszmaul9776b392023-01-14 14:08:08 -0800848 sha256 = "93cc41c53e98bbcd5db7b0631ab95a7de7744527d5847d2e795e6c8acec46bf8",
Austin Schuhf6b94632019-02-02 22:11:27 -0800849 urls = [
James Kuszmaul9776b392023-01-14 14:08:08 -0800850 "https://maven.ctr-electronics.com/release/com/ctre/phoenix/api-cpp/5.30.2/api-cpp-5.30.2-headers.zip",
Austin Schuhf6b94632019-02-02 22:11:27 -0800851 ],
852)
853
Austin Schuhf093fa52019-06-23 20:47:23 -0700854http_archive(
James Kuszmaul02eb05e2019-12-22 12:32:18 -0800855 name = "ctre_phoenix_api_cpp_athena",
Austin Schuhf6b94632019-02-02 22:11:27 -0800856 build_file_content = """
Austin Schuhde605f12022-02-23 23:08:19 -0800857filegroup(
858 name = 'shared_libraries',
859 srcs = [
860 'linux/athena/shared/libCTRE_Phoenix.so',
861 ],
862 visibility = ['//visibility:public'],
863)
864
Austin Schuhf6b94632019-02-02 22:11:27 -0800865cc_library(
866 name = 'api-cpp',
867 visibility = ['//visibility:public'],
Austin Schuhde605f12022-02-23 23:08:19 -0800868 srcs = ['linux/athena/shared/libCTRE_Phoenix.so'],
Philipp Schraderdada1072020-11-24 11:34:46 -0800869 target_compatible_with = ['@//tools/platforms/hardware:roborio'],
Austin Schuhf6b94632019-02-02 22:11:27 -0800870)
871""",
James Kuszmaul9776b392023-01-14 14:08:08 -0800872 sha256 = "63889beeeaac8bbef2573d23f1a9500b6382d28ab91c78f3605b6b624c27d68e",
Austin Schuhf6b94632019-02-02 22:11:27 -0800873 urls = [
James Kuszmaul9776b392023-01-14 14:08:08 -0800874 "https://maven.ctr-electronics.com/release/com/ctre/phoenix/api-cpp/5.30.2/api-cpp-5.30.2-linuxathena.zip",
Austin Schuhf6b94632019-02-02 22:11:27 -0800875 ],
876)
877
James Kuszmaul02eb05e2019-12-22 12:32:18 -0800878http_archive(
879 name = "ctre_phoenix_cci_headers",
Austin Schuhf6b94632019-02-02 22:11:27 -0800880 build_file_content = """
881cc_library(
882 name = 'cci',
883 visibility = ['//visibility:public'],
884 hdrs = glob(['ctre/phoenix/**/*.h']),
885)
886""",
James Kuszmaul9776b392023-01-14 14:08:08 -0800887 sha256 = "d41dd70aa4397cba934292e636c90511e571a56971f696348851fcd3bb88894d",
Austin Schuhf6b94632019-02-02 22:11:27 -0800888 urls = [
James Kuszmaul9776b392023-01-14 14:08:08 -0800889 "https://maven.ctr-electronics.com/release/com/ctre/phoenix/cci/5.30.2/cci-5.30.2-headers.zip",
Austin Schuhf6b94632019-02-02 22:11:27 -0800890 ],
891)
892
Austin Schuhf093fa52019-06-23 20:47:23 -0700893http_archive(
James Kuszmaul02eb05e2019-12-22 12:32:18 -0800894 name = "ctre_phoenix_cci_athena",
Austin Schuhf6b94632019-02-02 22:11:27 -0800895 build_file_content = """
Austin Schuhde605f12022-02-23 23:08:19 -0800896filegroup(
897 name = 'shared_libraries',
898 srcs = [
899 'linux/athena/shared/libCTRE_PhoenixCCI.so',
900 ],
901 visibility = ['//visibility:public'],
902)
903
Austin Schuhf6b94632019-02-02 22:11:27 -0800904cc_library(
905 name = 'cci',
906 visibility = ['//visibility:public'],
Austin Schuhde605f12022-02-23 23:08:19 -0800907 srcs = ['linux/athena/shared/libCTRE_PhoenixCCI.so'],
Philipp Schraderdada1072020-11-24 11:34:46 -0800908 target_compatible_with = ['@//tools/platforms/hardware:roborio'],
Austin Schuhf6b94632019-02-02 22:11:27 -0800909)
910""",
James Kuszmaul9776b392023-01-14 14:08:08 -0800911 sha256 = "b01f78b74ffcf01f48636dca894942e801ec6eac3daadcea7d65c4b74a80a056",
Austin Schuhf6b94632019-02-02 22:11:27 -0800912 urls = [
James Kuszmaul9776b392023-01-14 14:08:08 -0800913 "https://maven.ctr-electronics.com/release/com/ctre/phoenix/cci/5.30.2/cci-5.30.2-linuxathena.zip",
Austin Schuhf6b94632019-02-02 22:11:27 -0800914 ],
915)
Austin Schuheed14442019-03-23 14:42:46 -0700916
917http_archive(
Austin Schuhda9d0602019-09-15 17:29:38 -0700918 name = "build_bazel_rules_nodejs",
Philipp Schrader87277f42022-01-01 07:45:12 -0800919 sha256 = "cfc289523cf1594598215901154a6c2515e8bf3671fd708264a6f6aefe02bf39",
920 urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.4.6/rules_nodejs-4.4.6.tar.gz"],
Austin Schuhda9d0602019-09-15 17:29:38 -0700921)
Austin Schuheed14442019-03-23 14:42:46 -0700922
Philipp Schrader87277f42022-01-01 07:45:12 -0800923load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")
Austin Schuheed14442019-03-23 14:42:46 -0700924
925node_repositories()
926
927# Setup Bazel managed npm dependencies with the `yarn_install` rule.
Philipp Schrader87277f42022-01-01 07:45:12 -0800928
Austin Schuhda9d0602019-09-15 17:29:38 -0700929# To run yarn by hand, use:
930# bazel run @nodejs_linux_amd64//:bin/yarn -- list
931# I'm sure there is a better path, but that works...
Austin Schuheed14442019-03-23 14:42:46 -0700932yarn_install(
933 name = "npm",
Alex Perryeddc18c2022-01-29 16:22:41 -0800934 frozen_lockfile = True,
Austin Schuheed14442019-03-23 14:42:46 -0700935 package_json = "//:package.json",
Philipp Schraderb48f8ea2022-03-13 20:59:54 -0700936 patch_args = ["-p1"],
937 post_install_patches = [
938 "//third_party:npm/@bazel/protractor/bazel-protractor.patch",
939 ],
Austin Schuhda9d0602019-09-15 17:29:38 -0700940 symlink_node_modules = False,
Austin Schuheed14442019-03-23 14:42:46 -0700941 yarn_lock = "//:yarn.lock",
942)
Austin Schuh4ac96a82019-08-14 20:24:23 -0700943
Philipp Schrader54047962022-02-16 21:05:11 -0800944load("@build_bazel_rules_nodejs//toolchains/esbuild:esbuild_repositories.bzl", "esbuild_repositories")
945
946esbuild_repositories(npm_repository = "npm")
947
Alex Perryb3168082022-01-22 13:36:13 -0800948http_archive(
949 name = "io_bazel_rules_webtesting",
Philipp Schrader54047962022-02-16 21:05:11 -0800950 patch_args = ["-p1"],
951 patches = [
952 "@//third_party:rules_webtesting/rules_webtesting.patch",
953 ],
Alex Perryb3168082022-01-22 13:36:13 -0800954 sha256 = "e9abb7658b6a129740c0b3ef6f5a2370864e102a5ba5ffca2cea565829ed825a",
955 urls = ["https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.5/rules_webtesting.tar.gz"],
956)
957
Brian Silvermane84b0cf2022-08-13 19:36:21 -0700958http_archive(
959 name = "rules_rust_tinyjson",
960 build_file = "@rules_rust//util/process_wrapper:BUILD.tinyjson.bazel",
961 sha256 = "1a8304da9f9370f6a6f9020b7903b044aa9ce3470f300a1fba5bc77c78145a16",
962 strip_prefix = "tinyjson-2.3.0",
963 type = "tar.gz",
964 url = "https://crates.io/api/v1/crates/tinyjson/2.3.0/download",
965)
966
Brian Silverman01dfd872022-04-06 22:20:40 -0700967local_repository(
Ravago Jones16809802021-11-18 20:40:03 -0800968 name = "rules_rust",
Brian Silverman01dfd872022-04-06 22:20:40 -0700969 path = "third_party/rules_rust",
Ravago Jones16809802021-11-18 20:40:03 -0800970)
971
Brian Silvermane84b0cf2022-08-13 19:36:21 -0700972load("@rules_rust//rust:repositories.bzl", "rust_repository_set")
Ravago Jones16809802021-11-18 20:40:03 -0800973
Brian Silvermane84b0cf2022-08-13 19:36:21 -0700974rust_repository_set(
Ravago Jones16809802021-11-18 20:40:03 -0800975 name = "rust",
Brian Silverman8751d482022-05-18 23:28:44 -0700976 allocator_library = "@//tools/rust:forward_allocator",
Ravago Jones16809802021-11-18 20:40:03 -0800977 edition = "2021",
978 exec_triple = "x86_64-unknown-linux-gnu",
979 extra_target_triples = [
980 "arm-unknown-linux-gnueabi",
981 "armv7-unknown-linux-gnueabihf",
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800982 "aarch64-unknown-linux-gnu",
Ravago Jones16809802021-11-18 20:40:03 -0800983 ],
Brian Silvermane84b0cf2022-08-13 19:36:21 -0700984 register_toolchain = False,
Brian Silvermana8ad1af2022-07-23 16:05:12 -0700985 rustfmt_version = "1.62.0",
Brian Silvermana8ad1af2022-07-23 16:05:12 -0700986 version = "1.62.0",
Ravago Jones16809802021-11-18 20:40:03 -0800987)
988
Philipp Schrader54047962022-02-16 21:05:11 -0800989load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
990
991web_test_repositories()
992
993load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.3.bzl", "browser_repositories")
994
995browser_repositories(chromium = True)
996
Austin Schuh4ac96a82019-08-14 20:24:23 -0700997# Flatbuffers
998local_repository(
999 name = "com_github_google_flatbuffers",
1000 path = "third_party/flatbuffers",
1001)
James Kuszmaul7daef362019-12-31 18:28:17 -08001002
1003http_file(
1004 name = "sample_logfile",
1005 downloaded_file_path = "log.fbs",
milind945708b2021-07-03 13:30:15 -07001006 sha256 = "45d1d19fb82786c476d3f21a8d62742abaeeedf4c16a00ec37ae350dcb61f1fc",
1007 urls = ["https://www.frc971.org/Build-Dependencies/small_sample_logfile2.fbs"],
James Kuszmaul7daef362019-12-31 18:28:17 -08001008)
Brian Silvermand4260c72020-01-14 00:08:02 -08001009
James Kuszmaul9c128122021-03-22 22:24:36 -07001010http_archive(
James Kuszmaul531609d2020-02-18 17:12:23 -08001011 name = "drivetrain_replay",
James Kuszmaul9c128122021-03-22 22:24:36 -07001012 build_file_content = """
1013filegroup(
1014 name = "drivetrain_replay",
1015 srcs = glob(["**/*.bfbs"]),
1016 visibility = ["//visibility:public"],
1017)
1018 """,
1019 sha256 = "115dcd2fe005cb9cad3325707aa7f4466390c43a08555edf331c06c108bdf692",
1020 url = "https://www.frc971.org/Build-Dependencies/2021-03-20_drivetrain_spin_wheels.tar.gz",
James Kuszmaul531609d2020-02-18 17:12:23 -08001021)
1022
milind-u7baf7342021-08-25 18:31:26 -07001023http_archive(
1024 name = "superstructure_replay",
1025 build_file_content = """
1026filegroup(
1027 name = "superstructure_replay",
1028 srcs = glob(["**/*.bfbs"]),
1029 visibility = ["//visibility:public"],
1030)
1031 """,
milind-u200b2762021-11-06 19:36:15 -07001032 sha256 = "2b9a3ecc83f2aba89a1909ae38fe51e6718a5b4d0e7c131846dfb2845df9cd19",
1033 url = "https://www.frc971.org/Build-Dependencies/2021-10-03_superstructure_shoot_balls.tar.gz",
milind-u7baf7342021-08-25 18:31:26 -07001034)
1035
Philipp Schraderf1bbf342022-02-05 14:30:15 -08001036# OpenCV arm64 (for raspberry pi)
1037http_archive(
1038 name = "opencv_arm64",
1039 build_file = "@//debian:opencv.BUILD",
1040 sha256 = "d284fae46ca710cf24c81ff7ace34929773466bff38f365a80371bea3b36a2ed",
1041 url = "https://www.frc971.org/Build-Dependencies/opencv_arm64.tar.gz",
1042)
1043
Brian Silvermand4260c72020-01-14 00:08:02 -08001044# OpenCV armhf (for raspberry pi)
1045http_archive(
1046 name = "opencv_armhf",
1047 build_file = "@//debian:opencv.BUILD",
Brian Silverman4c7235a2021-11-17 19:04:37 -08001048 sha256 = "064165507bad1afa8f7b22961a9a9067b243abc70064d713d26b37bc8dc2bf56",
1049 url = "https://www.frc971.org/Build-Dependencies/opencv_armhf_v4.tar.gz",
Brian Silvermand4260c72020-01-14 00:08:02 -08001050)
Brian Silvermand97a47c2020-01-16 00:47:53 -08001051
1052http_archive(
1053 name = "opencv_k8",
1054 build_file = "@//debian:opencv.BUILD",
Brian Silverman4c7235a2021-11-17 19:04:37 -08001055 sha256 = "b730f5d0c8eb59411157b4e84bfdddd3a6fceed10b842716d9d1b74ad322ea14",
1056 url = "https://www.frc971.org/Build-Dependencies/opencv_amd64_v3.tar.gz",
Brian Silvermand97a47c2020-01-16 00:47:53 -08001057)
Brian Silverman764945b2020-01-16 23:40:43 -08001058
Brian Silverman764945b2020-01-16 23:40:43 -08001059http_archive(
1060 name = "halide_k8",
1061 build_file = "@//debian:halide.BUILD",
Austin Schuh669068e2023-01-04 20:50:34 -08001062 sha256 = "be3bdd067acb9ee0d37d0830821113cd69174bee46da466a836d8829fef7cf91",
1063 strip_prefix = "Halide-14.0.0-x86-64-linux/",
1064 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 -08001065)
1066
Philipp Schraderf1bbf342022-02-05 14:30:15 -08001067http_archive(
1068 name = "halide_arm64",
1069 build_file = "@//debian:halide.BUILD",
Austin Schuh669068e2023-01-04 20:50:34 -08001070 sha256 = "cdd42411bcbba682f73d7db0af69837c4857ee90f1727c6feb37fc9a98132385",
1071 strip_prefix = "Halide-14.0.0-arm-64-linux/",
1072 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 -08001073)
1074
Brian Silverman764945b2020-01-16 23:40:43 -08001075http_archive(
1076 name = "halide_armhf",
1077 build_file = "@//debian:halide.BUILD",
Austin Schuh669068e2023-01-04 20:50:34 -08001078 sha256 = "6b3fe3396391b57990a2c41d8dcea74b0734d1b2a0fd42fe0858d954aa45df2b",
1079 strip_prefix = "Halide-14.0.0-arm-32-linux/",
1080 url = "https://github.com/halide/Halide/releases/download/v14.0.0/Halide-14.0.0-arm-32-linux-6b9ed2afd1d6d0badf04986602c943e287d44e46.tar.gz",
Brian Silverman764945b2020-01-16 23:40:43 -08001081)
Brian Silverman4fe44ea2020-02-02 12:56:42 -08001082
Austin Schuh2e28d872022-02-19 18:25:57 -08001083http_archive(
Tyler Chatow60671d32020-02-26 19:49:30 -08001084 name = "gstreamer_k8",
1085 build_file = "@//debian:gstreamer.BUILD",
Tyler Chatow6eda82c2022-03-27 22:37:38 -07001086 sha256 = "d4994261a432c188716f0bdf30fc3f0dff6727319d9c58e7156e2b3ed5105248",
1087 url = "https://www.frc971.org/Build-Dependencies/gstreamer_1.20.1-1~bpo11+1_amd64.tar.gz",
Tyler Chatow60671d32020-02-26 19:49:30 -08001088)
1089
1090http_archive(
1091 name = "gstreamer_armhf",
1092 build_file = "@//debian:gstreamer.BUILD",
1093 sha256 = "c5ac4c604952c274a50636e244f0d091bd1de302032446f24f0e9e03ae9c76f7",
Austin Schuha5778ae2020-10-21 21:15:35 -07001094 url = "https://www.frc971.org/Build-Dependencies/gstreamer_armhf.tar.gz",
Tyler Chatow60671d32020-02-26 19:49:30 -08001095)
James Kuszmaulc91e4402020-05-10 18:47:20 -07001096
Tyler Chatow6eda82c2022-03-27 22:37:38 -07001097http_archive(
1098 name = "gstreamer_arm64",
1099 build_file = "@//debian:gstreamer.BUILD",
1100 sha256 = "42b414c565ffdbae3d2d7796a66da9de42a650de757fa6554fd624f0cc3aaa9b",
1101 url = "https://www.frc971.org/Build-Dependencies/gstreamer_1.20.1-1~bpo11+1_arm64.tar.gz",
1102)
1103
Brian Silvermanf59fe3f2020-09-22 21:04:09 -07001104# //debian:lzma_amd64
1105http_archive(
1106 name = "lzma_amd64",
1107 build_file_content = """
1108cc_library(
1109 name = "lib",
1110 srcs = [
1111 "usr/lib/x86_64-linux-gnu/liblzma.a",
1112 ],
1113 hdrs = glob([
1114 "usr/include/lzma/*.h",
1115 "usr/include/*.h",
1116 ]),
1117 strip_include_prefix = "usr/include",
1118 visibility = ["//visibility:public"],
1119)
1120""",
Austin Schuhe6751772022-06-27 00:58:26 -07001121 sha256 = "6fa0ad579b78bd41a0133024c34063b140442dd2ad4201fd2bf4c55229e7c13f",
1122 urls = ["https://www.frc971.org/Build-Dependencies/lzma_amd64-2.tar.gz"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -07001123)
1124
1125# //debian:lzma_arm64
1126http_archive(
1127 name = "lzma_arm64",
1128 build_file_content = """
1129cc_library(
1130 name = "lib",
1131 srcs = [
1132 "usr/lib/aarch64-linux-gnu/liblzma.a",
1133 ],
1134 hdrs = glob([
1135 "usr/include/lzma/*.h",
1136 "usr/include/*.h",
1137 ]),
1138 strip_include_prefix = "usr/include",
1139 visibility = ["//visibility:public"],
1140)
1141""",
Austin Schuhc020b182022-06-29 19:54:01 -07001142 sha256 = "b4ab9fd7cf3bfdb9e3fc67ac4a3c84db7f7e3c48431ccfc6e6e210f5829d17c9",
1143 urls = ["https://www.frc971.org/Build-Dependencies/lzma_arm64-2.tar.gz"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -07001144)
James Kuszmaul2cffe852021-10-27 20:17:49 -07001145
1146local_repository(
1147 name = "snappy",
1148 path = "third_party/snappy",
1149)
Philipp Schrader73e56602021-12-06 21:37:30 -08001150
1151http_archive(
1152 name = "io_bazel_rules_go",
Philipp Schrader039f5c32022-01-20 22:30:01 -08001153 patch_args = [
1154 "-p1",
1155 ],
1156 patches = [
1157 "@//third_party:rules_go/0001-Disable-warnings-for-external-repositories.patch",
1158 ],
Philipp Schrader73e56602021-12-06 21:37:30 -08001159 sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f",
1160 urls = [
1161 "https://www.frc971.org/Build-Dependencies/rules_go-v0.29.0.zip",
1162 "https://github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
1163 ],
1164)
1165
Philipp Schrader37fdbb62021-12-18 00:30:37 -08001166http_archive(
1167 name = "bazel_gazelle",
1168 sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
1169 urls = [
1170 "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
1171 "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
1172 ],
1173)
1174
Philipp Schrader73e56602021-12-06 21:37:30 -08001175load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
1176
1177go_rules_dependencies()
1178
Philipp Schrader6097ed12022-03-26 15:37:37 -07001179go_register_toolchains(version = "1.18")
Philipp Schrader37fdbb62021-12-18 00:30:37 -08001180
1181load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
1182load("//:go_deps.bzl", "go_dependencies")
1183load("//tools/go:mirrored_go_deps.bzl", "mirrored_go_dependencies")
1184
1185mirrored_go_dependencies()
1186
1187# gazelle:repository_macro go_deps.bzl%go_dependencies
1188go_dependencies()
1189
1190gazelle_dependencies()
Philipp Schradercc016b32021-12-30 08:59:58 -08001191
1192http_archive(
1193 name = "com_github_bazelbuild_buildtools",
1194 sha256 = "44a6e5acc007e197d45ac3326e7f993f0160af9a58e8777ca7701e00501c0857",
1195 strip_prefix = "buildtools-4.2.4",
1196 urls = [
1197 "https://github.com/bazelbuild/buildtools/archive/refs/tags/4.2.4.tar.gz",
1198 ],
1199)
Philipp Schrader0f5d2502022-03-08 22:44:55 -08001200
1201http_archive(
Tyler Chatowec100e22022-03-22 16:23:04 -07001202 name = "libtinfo5_amd64",
Tyler Chatow8a51ac62022-03-15 13:23:12 -07001203 build_file_content = """
1204exports_files(
1205 [
1206 'lib/x86_64-linux-gnu/libtinfo.so.5',
1207 'lib/x86_64-linux-gnu/libtinfo.so.5.9',
1208 ],
1209 ["//visibility:public"],
1210)
1211""",
1212 patch_cmds = ["touch lib/x86_64-linux-gnu/BUILD"],
1213 sha256 = "059e14f77dce365c57b96284aae98c892f61e269b3fbb7d07714b7135c2e5617",
1214 urls = ["https://www.frc971.org/Build-Dependencies/libtinfo5_amd64.tar.gz"],
1215)
Tyler Chatowec100e22022-03-22 16:23:04 -07001216
1217http_archive(
1218 name = "libtinfo5_arm64",
1219 build_file_content = """
1220exports_files(
1221 [
1222 'lib/aarch64-linux-gnu/libtinfo.so.5',
1223 'lib/aarch64-linux-gnu/libtinfo.so.5.9',
1224 ],
1225 ["//visibility:public"],
1226)
1227""",
1228 patch_cmds = ["touch lib/aarch64-linux-gnu/BUILD"],
1229 sha256 = "df4ea5194c80df8d1f5f6ed68b47ce9dbf78aa8cdebbc61cf00654d9075f8e3c",
1230 urls = ["https://www.frc971.org/Build-Dependencies/libtinfo5_arm64.tar.gz"],
1231)
James Kuszmaul4ed5fb12022-03-22 15:20:04 -07001232
Philipp Schraderf60e7d72023-02-19 17:07:22 -08001233http_archive(
1234 name = "xvfb_amd64",
1235 build_file = "//third_party:xvfb/xvfb.BUILD",
1236 patch_cmds = [
1237 "unlink usr/bin/X11",
1238 ],
1239 sha256 = "a7491bf6c47ed0037992fa493f9c25af3ab00a695d706e1fdc122a8b798c0d7c",
1240 urls = ["https://www.frc971.org/Build-Dependencies/xvfb_amd64.tar.gz"],
1241)
1242
James Kuszmaul4ed5fb12022-03-22 15:20:04 -07001243local_repository(
1244 name = "com_github_nlohmann_json",
1245 path = "third_party/com_github_nlohmann_json",
1246)
James Kuszmaul5c56ed32022-03-30 15:10:07 -07001247
Austin Schuh86110712022-09-16 15:40:54 -07001248# https://curl.haxx.se/download/curl-7.69.1.tar.gz
1249http_archive(
1250 name = "com_github_curl_curl",
1251 build_file = "//debian:curl.BUILD",
1252 sha256 = "01ae0c123dee45b01bbaef94c0bc00ed2aec89cb2ee0fd598e0d302a6b5e0a98",
1253 strip_prefix = "curl-7.69.1",
1254 url = "https://www.frc971.org/Build-Dependencies/curl-7.69.1.tar.gz",
1255)
1256
1257http_archive(
1258 # No official name exists. Names used in our external dependencies include
1259 # zlib, madler_zlib, com_github_madler_zlib.
1260 name = "zlib",
1261 build_file = "//debian:BUILD.zlib.bazel",
1262 sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff",
1263 strip_prefix = "zlib-1.2.11",
1264 urls = [
1265 "https://github.com/madler/zlib/archive/v1.2.11.tar.gz",
1266 ],
1267)
1268
1269# This one is tricky to get an archive because it has recursive submodules. These semi-automated steps do work though:
James Kuszmaulb0931ac2023-01-24 14:23:13 -08001270# git clone -b 1.10.34 --recurse-submodules --depth=1 https://github.com/aws/aws-sdk-cpp
Austin Schuh86110712022-09-16 15:40:54 -07001271# cd aws-sdk-cpp
1272# 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/\)')
1273# Now run the command that printed, and the output will be at aws_sdk-version.tar.gz.
1274http_archive(
1275 name = "aws_sdk",
1276 build_file = "//debian:aws_sdk.BUILD",
1277 patch_args = ["-p1"],
1278 patches = ["//debian:aws_sdk.patch"],
James Kuszmaulb0931ac2023-01-24 14:23:13 -08001279 sha256 = "de6570d10c246189fd8c02100f7f0d9af8499a3ef94a131eeb85619f3bd6c604",
1280 url = "https://www.frc971.org/Build-Dependencies/aws_sdk-1.10.34.tar.gz",
Austin Schuh86110712022-09-16 15:40:54 -07001281)
1282
James Kuszmaul5ab990d2022-11-07 16:35:49 -08001283# Source code of LZ4 (files under lib/) are under BSD 2-Clause.
1284# The rest of the repository (build information, documentation, etc.) is under GPLv2.
1285# We only care about the lib/ subfolder anyways, and strip out any other files.
1286http_archive(
1287 name = "com_github_lz4_lz4",
1288 build_file = "//debian:BUILD.lz4.bazel",
1289 sha256 = "0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b",
1290 strip_prefix = "lz4-1.9.4/lib",
1291 url = "https://github.com/lz4/lz4/archive/refs/tags/v1.9.4.tar.gz",
1292)
1293
James Kuszmaul5c56ed32022-03-30 15:10:07 -07001294http_file(
1295 name = "com_github_foxglove_mcap_mcap",
1296 executable = True,
James Kuszmaul5ab990d2022-11-07 16:35:49 -08001297 sha256 = "ae745dd09cf4c9570c1c038a72630c07b073f0ed4b05983d64108ff748a40d3f",
1298 urls = ["https://github.com/foxglove/mcap/releases/download/releases%2Fmcap-cli%2Fv0.0.22/mcap-linux-amd64"],
James Kuszmaul5c56ed32022-03-30 15:10:07 -07001299)
Brian Silverman0aa13732022-05-19 23:14:08 -07001300
1301http_archive(
1302 name = "cargo_raze",
1303 patches = ["@//third_party/cargo_raze:cargo_raze.patch"],
1304 sha256 = "08bfc8859ff686ecb55005a3c4a9cf790115de0abdbcc69cf57b15be0745a859",
1305 strip_prefix = "cargo-raze-0.14.2",
1306 url = "https://github.com/google/cargo-raze/archive/v0.14.2.tar.gz",
1307)
1308
1309http_archive(
1310 name = "rules_foreign_cc",
1311 patch_args = ["-p1"],
1312 patches = ["@//third_party/rules_foreign_cc:backport_d93bd96dc719760c968b54730258ad0a5b10f8fb.patch"],
1313 sha256 = "69023642d5781c68911beda769f91fcbc8ca48711db935a75da7f6536b65047f",
1314 strip_prefix = "rules_foreign_cc-0.6.0",
1315 url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.6.0.tar.gz",
1316)
1317
1318load("@cargo_raze//:repositories.bzl", "cargo_raze_repositories")
1319
1320cargo_raze_repositories()
1321
1322# cargo_raze_transitive_deps wants to do `rust_repositories`, which we do
1323# manually to get the right platforms. rules_foreign_cc is currently the only
1324# other thing it has, so just do that manually.
1325load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
1326
1327rules_foreign_cc_dependencies()
Brian Silverman547eda02022-05-19 23:14:08 -07001328
1329load("//third_party/cargo:crates.bzl", "raze_fetch_remote_crates")
1330
1331raze_fetch_remote_crates()
James Kuszmaul0de4feb2022-04-15 12:16:59 -07001332
1333http_archive(
1334 name = "com_github_zaphoyd_websocketpp",
1335 build_file = "//third_party/websocketpp:websocketpp.BUILD",
Ravago Jones0c74c122023-01-08 15:20:19 -08001336 patch_args = ["-p1"],
1337 patches = ["//third_party/websocketpp:websocketpp.patch"],
James Kuszmaul0de4feb2022-04-15 12:16:59 -07001338 sha256 = "6ce889d85ecdc2d8fa07408d6787e7352510750daa66b5ad44aacb47bea76755",
1339 strip_prefix = "websocketpp-0.8.2",
1340 url = "https://github.com/zaphoyd/websocketpp/archive/refs/tags/0.8.2.tar.gz",
1341)
1342
1343http_archive(
1344 name = "com_github_foxglove_ws-protocol",
James Kuszmaul6b609292023-01-28 15:58:43 -08001345 build_file = "//third_party/foxglove/ws_protocol:foxglove_ws_protocol.BUILD",
James Kuszmaul0de4feb2022-04-15 12:16:59 -07001346 patch_args = ["-p1"],
James Kuszmaul6b609292023-01-28 15:58:43 -08001347 patches = ["//third_party/foxglove/ws_protocol:foxglove_ws_protocol.patch"],
James Kuszmaul0de4feb2022-04-15 12:16:59 -07001348 sha256 = "3256f09a67419f6556778c443d332f1a4bf53ba0e7a464179bf838abffa366ab",
1349 strip_prefix = "ws-protocol-releases-typescript-ws-protocol-examples-v0.0.6",
1350 url = "https://github.com/foxglove/ws-protocol/archive/refs/tags/releases/typescript/ws-protocol-examples/v0.0.6.tar.gz",
1351)
1352
1353http_archive(
1354 name = "asio",
1355 build_file_content = """
1356cc_library(
1357 name = "asio",
1358 hdrs = glob(["include/asio/**/*.hpp", "include/asio/**/*.ipp", "include/asio.hpp"]),
1359 visibility = ["//visibility:public"],
1360 defines = ["ASIO_STANDALONE"],
1361 includes = ["include/"],
1362)""",
1363 sha256 = "8976812c24a118600f6fcf071a20606630a69afe4c0abee3b0dea528e682c585",
1364 strip_prefix = "asio-1.24.0",
1365 url = "https://downloads.sourceforge.net/project/asio/asio/1.24.0%2520%2528Stable%2529/asio-1.24.0.tar.bz2",
1366)
James Kuszmaul6b609292023-01-28 15:58:43 -08001367
1368http_archive(
1369 name = "com_github_foxglove_schemas",
1370 build_file = "//third_party/foxglove/schemas:schemas.BUILD",
1371 sha256 = "c0d08365eb8fba0af7773b5f0095fb53fb53f020bde46edaa308af5bb939fc15",
1372 strip_prefix = "schemas-7a3e077b88142ac46bb4e2616f83dc029b45352e/schemas/flatbuffer",
1373 url = "https://github.com/foxglove/schemas/archive/7a3e077b88142ac46bb4e2616f83dc029b45352e.tar.gz",
1374)
James Kuszmaul3398d0b2023-02-11 22:55:22 -08001375
1376# This contains the *compiled* foxglove studio. This can be reproduced by:
1377# 1. Cloning https://github.com/foxglove/studio
1378# 2. Building the code (yarn web:build:prod)
1379# 3. tar'ing the web/.webpack folder
1380# These files can be hosted locally to provide an offline foxglove server.
1381# Foxglove may be served on any port and may be nested at a subpath
1382# (e.g., at hostname:8000/foxglove behind a proxy).
1383http_archive(
1384 name = "foxglove_studio",
1385 build_file_content = """
1386filegroup(
1387 name = "foxglove_studio",
1388 srcs = glob(["**"]),
1389 visibility = ["//visibility:public"],
1390)""",
1391 sha256 = "629b150e4c71679e1ac30b8a2dfa558a04bbcca7ad0edd61bd6878d3b243edb6",
1392 url =
1393 "https://www.frc971.org/Build-Dependencies/foxglove-d6b00825.tar.gz",
1394)
Ravago Jones9c10b2a2023-02-06 12:41:59 -08001395
1396#
1397# https://www.st.com/en/embedded-software/stsw-img009.html#overview
1398http_archive(
1399 name = "vl53l1x_ultra_lite_driver_api",
1400 build_file = "//third_party/vl53l1x:vl53l1x.BUILD",
1401 patch_args = ["-p1"],
1402 patches = ["//third_party/vl53l1x:vl53l1x.patch"],
1403 sha256 = "06a66254ab7a8b061f93ff0f65abb6088c3ea50335475bb6ac11087beb65d174",
1404 strip_prefix = "en.STSW-IMG009_v3.5.2/API",
1405 url = "https://www.frc971.org/Build-Dependencies/en.STSW-IMG009.zip",
1406)