blob: eb250cf4df93c33e8ccc662205eae1535f442bed [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")
Brian Silverman7bda6212018-08-05 11:42:11 -07006load(
7 "//debian:python.bzl",
8 python_debs = "files",
9)
10load(
Philipp Schraderd0e33a42022-01-22 21:55:15 -080011 "//debian:apache2.bzl",
12 apache2_debs = "files",
13)
14load(
Philipp Schrader41011a12022-03-13 12:49:32 -070015 "//debian:postgresql_amd64.bzl",
16 postgresql_amd64_debs = "files",
17)
18load(
Brian Silverman7bda6212018-08-05 11:42:11 -070019 "//debian:patch.bzl",
20 patch_debs = "files",
21)
Brian Silverman7297c0c2018-08-05 13:43:00 -070022load(
Austin Schuh71f6fa72019-08-31 18:23:02 -070023 "//debian:rsync.bzl",
24 rsync_debs = "files",
25)
26load(
27 "//debian:ssh.bzl",
28 ssh_debs = "files",
29)
30load(
Brian Silverman7297c0c2018-08-05 13:43:00 -070031 "//debian:pandoc.bzl",
32 pandoc_debs = "files",
33)
Brian Silverman4f6ba442018-08-05 14:34:58 -070034load(
35 "//debian:libusb.bzl",
36 libusb_debs = "files",
37)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -070038load(
39 "//debian:mingw_compiler.bzl",
40 mingw_compiler_debs = "files",
41)
Brian Silverman6470f442018-08-05 12:08:16 -070042load(
43 "//debian:patchelf.bzl",
44 patchelf_debs = "files",
45)
46load(
47 "//debian:matplotlib.bzl",
48 matplotlib_debs = "files",
49)
Brian Silverman50b9ac02018-08-12 13:24:10 -070050load(
51 "//debian:arm_frc_gnueabi_deps.bzl",
52 arm_frc_gnueabi_deps_debs = "files",
53)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070054load(
55 "//debian:python_gtk.bzl",
56 python_gtk_debs = "files",
57)
Brian Silvermand4260c72020-01-14 00:08:02 -080058load(
Philipp Schraderf1bbf342022-02-05 14:30:15 -080059 "//debian:opencv_arm64.bzl",
60 opencv_arm64_debs = "files",
61)
62load(
Brian Silvermand4260c72020-01-14 00:08:02 -080063 "//debian:opencv_armhf.bzl",
64 opencv_armhf_debs = "files",
65)
Brian Silvermand97a47c2020-01-16 00:47:53 -080066load(
67 "//debian:opencv_amd64.bzl",
68 opencv_amd64_debs = "files",
69)
Tyler Chatow60671d32020-02-26 19:49:30 -080070load(
71 "//debian:gstreamer_amd64.bzl",
James Kuszmaulc91e4402020-05-10 18:47:20 -070072 gstreamer_amd64_debs = "files",
Tyler Chatow60671d32020-02-26 19:49:30 -080073)
74load(
75 "//debian:gstreamer_armhf.bzl",
James Kuszmaulc91e4402020-05-10 18:47:20 -070076 gstreamer_armhf_debs = "files",
Tyler Chatow60671d32020-02-26 19:49:30 -080077)
Austin Schuh023e7f52020-08-18 21:24:37 -070078load(
79 "//debian:m4.bzl",
80 m4_debs = "files",
81)
Brian Silvermanf59fe3f2020-09-22 21:04:09 -070082load(
83 "//debian:lzma_amd64.bzl",
84 lzma_amd64_debs = "files",
85)
86load(
87 "//debian:lzma_arm64.bzl",
88 lzma_arm64_debs = "files",
89)
Philipp Schrader0e19c602018-03-07 21:07:22 -080090load("//debian:packages.bzl", "generate_repositories_for_debs")
91
92generate_repositories_for_debs(python_debs)
Brian Silverman7bda6212018-08-05 11:42:11 -070093
Austin Schuh71f6fa72019-08-31 18:23:02 -070094generate_repositories_for_debs(rsync_debs)
95
96generate_repositories_for_debs(ssh_debs)
97
Philipp Schraderd0e33a42022-01-22 21:55:15 -080098generate_repositories_for_debs(apache2_debs)
99
Philipp Schrader41011a12022-03-13 12:49:32 -0700100generate_repositories_for_debs(postgresql_amd64_debs)
101
Brian Silverman7bda6212018-08-05 11:42:11 -0700102generate_repositories_for_debs(patch_debs)
103
Brian Silverman7297c0c2018-08-05 13:43:00 -0700104generate_repositories_for_debs(pandoc_debs)
105
Brian Silverman4f6ba442018-08-05 14:34:58 -0700106generate_repositories_for_debs(libusb_debs)
107
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700108generate_repositories_for_debs(mingw_compiler_debs)
109
Brian Silverman6470f442018-08-05 12:08:16 -0700110generate_repositories_for_debs(patchelf_debs)
111
112generate_repositories_for_debs(matplotlib_debs)
113
Brian Silverman50b9ac02018-08-12 13:24:10 -0700114generate_repositories_for_debs(arm_frc_gnueabi_deps_debs)
115
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700116generate_repositories_for_debs(python_gtk_debs)
117
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800118generate_repositories_for_debs(opencv_arm64_debs)
119
Brian Silvermand4260c72020-01-14 00:08:02 -0800120generate_repositories_for_debs(opencv_armhf_debs)
121
Brian Silvermand97a47c2020-01-16 00:47:53 -0800122generate_repositories_for_debs(opencv_amd64_debs)
123
Tyler Chatow60671d32020-02-26 19:49:30 -0800124generate_repositories_for_debs(gstreamer_amd64_debs)
125
126generate_repositories_for_debs(gstreamer_armhf_debs)
127
Austin Schuh023e7f52020-08-18 21:24:37 -0700128generate_repositories_for_debs(m4_debs)
129
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700130generate_repositories_for_debs(lzma_amd64_debs)
131
132generate_repositories_for_debs(lzma_arm64_debs)
133
Brian Silvermanc0309a02022-01-01 23:57:03 -0800134local_repository(
135 name = "com_grail_bazel_toolchain",
136 path = "third_party/bazel-toolchain",
137)
138
Brian Silverman4c7235a2021-11-17 19:04:37 -0800139load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm", "llvm_toolchain")
140
141llvm_version = "13.0.0"
142
143llvm(
144 name = "llvm_k8",
145 distribution = "clang+llvm-%s-x86_64-linux-gnu-ubuntu-16.04.tar.xz" % llvm_version,
146 llvm_version = llvm_version,
147)
148
149llvm(
150 name = "llvm_armv7",
151 distribution = "clang+llvm-%s-armv7a-linux-gnueabihf.tar.xz" % llvm_version,
152 llvm_version = llvm_version,
153)
154
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800155llvm(
156 name = "llvm_aarch64",
157 distribution = "clang+llvm-%s-aarch64-linux-gnu.tar.xz" % llvm_version,
158 llvm_version = llvm_version,
159)
160
Brian Silverman4c7235a2021-11-17 19:04:37 -0800161llvm_conlyopts = [
162 "-std=gnu99",
163]
164
165llvm_copts = [
166 "-D__STDC_FORMAT_MACROS",
167 "-D__STDC_CONSTANT_MACROS",
168 "-D__STDC_LIMIT_MACROS",
169 "-D_FILE_OFFSET_BITS=64",
170 "-fmessage-length=100",
171 "-fmacro-backtrace-limit=0",
172 "-Wextra",
173 "-Wpointer-arith",
174 "-Wstrict-aliasing",
175 "-Wcast-qual",
176 "-Wcast-align",
177 "-Wwrite-strings",
178 "-Wtype-limits",
179 "-Wsign-compare",
180 "-Wformat=2",
181 "-Werror",
182 "-ggdb3",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800183]
184
185llvm_cxxopts = [
186 "-std=gnu++17",
187]
188
Brian Silverman1e7c8972022-02-03 23:15:41 -0800189llvm_opt_copts = [
190 "-DAOS_DEBUG=0",
191]
192
193llvm_fastbuild_copts = [
194 "-DAOS_DEBUG=0",
195]
196
Brian Silverman4c7235a2021-11-17 19:04:37 -0800197llvm_dbg_copts = [
198 "-DAOS_DEBUG=1",
199]
Brian Silvermanc0309a02022-01-01 23:57:03 -0800200
201llvm_toolchain(
202 name = "llvm_toolchain",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800203 additional_target_compatible_with = {
204 "linux-armv7": [
205 "@//tools/platforms/hardware:raspberry_pi",
206 ],
207 },
208 conlyopts = {
209 "linux-x86_64": llvm_conlyopts,
210 "linux-armv7": llvm_conlyopts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800211 "linux-aarch64": llvm_conlyopts,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800212 },
213 copts = {
214 "linux-x86_64": llvm_copts,
215 "linux-armv7": llvm_copts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800216 "linux-aarch64": llvm_copts,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800217 },
218 cxxopts = {
219 "linux-x86_64": llvm_cxxopts,
220 "linux-armv7": llvm_cxxopts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800221 "linux-aarch64": llvm_cxxopts,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800222 },
223 dbg_copts = {
224 "linux-x86_64": llvm_dbg_copts,
Brian Silverman1e7c8972022-02-03 23:15:41 -0800225 "linux-armv7": llvm_dbg_copts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800226 "linux-aarch64": llvm_dbg_copts,
Brian Silverman1e7c8972022-02-03 23:15:41 -0800227 },
228 fastbuild_copts = {
229 "linux-x86_64": llvm_fastbuild_copts,
230 "linux-armv7": llvm_fastbuild_copts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800231 "linux-aarch64": llvm_fastbuild_copts,
Brian Silverman4c7235a2021-11-17 19:04:37 -0800232 },
233 llvm_version = llvm_version,
Brian Silverman1e7c8972022-02-03 23:15:41 -0800234 opt_copts = {
235 "linux-x86_64": llvm_opt_copts,
236 "linux-armv7": llvm_opt_copts,
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800237 "linux-aarch64": llvm_opt_copts,
Brian Silverman1e7c8972022-02-03 23:15:41 -0800238 },
Brian Silverman4c7235a2021-11-17 19:04:37 -0800239 standard_libraries = {
240 "linux-x86_64": "libstdc++-10",
241 "linux-armv7": "libstdc++-10",
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800242 "linux-aarch64": "libstdc++-10",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800243 },
244 static_libstdcxx = False,
Brian Silvermanc0309a02022-01-01 23:57:03 -0800245 sysroot = {
246 "linux-x86_64": "@amd64_debian_sysroot//:sysroot_files",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800247 "linux-armv7": "@armhf_debian_rootfs//:sysroot_files",
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800248 "linux-aarch64": "@arm64_debian_rootfs//:sysroot_files",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800249 },
250 target_toolchain_roots = {
251 "linux-x86_64": "@llvm_k8//",
252 "linux-armv7": "@llvm_armv7//",
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800253 "linux-aarch64": "@llvm_aarch64//",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800254 },
255 toolchain_roots = {
256 "linux-x86_64": "@llvm_k8//",
Brian Silvermanc0309a02022-01-01 23:57:03 -0800257 },
258)
259
Brian Silverman4c7235a2021-11-17 19:04:37 -0800260load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
261
262llvm_register_toolchains()
263
Philipp Schraderdada1072020-11-24 11:34:46 -0800264register_toolchains(
Philipp Schraderdada1072020-11-24 11:34:46 -0800265 "//tools/cpp:cc-toolchain-roborio",
266 "//tools/cpp:cc-toolchain-cortex-m4f",
Austin Schuh0a96ea32022-01-01 22:29:30 -0800267 "//tools/cpp:cc-toolchain-rp2040",
Philipp Schraderdada1072020-11-24 11:34:46 -0800268 # Find a good way to select between these two M4F toolchains.
269 #"//tools/cpp:cc-toolchain-cortex-m4f-k22",
Philipp Schraderf198a152021-12-05 09:18:23 -0800270 "//tools/python:python_toolchain",
Philipp Schrader73e56602021-12-06 21:37:30 -0800271 "//tools/go:noop_go_toolchain",
Ravago Jones16809802021-11-18 20:40:03 -0800272 "//tools/rust:rust-toolchain-roborio",
273 "//tools/rust:noop_rust_toolchain",
Philipp Schrader54047962022-02-16 21:05:11 -0800274 "//tools/ts:noop_node_toolchain",
Philipp Schraderdada1072020-11-24 11:34:46 -0800275)
276
Philipp Schrader37fdbb62021-12-18 00:30:37 -0800277load("//tools/ci:repo_defs.bzl", "ci_configure")
278
279ci_configure(name = "ci_configure")
280
Philipp Schraderdada1072020-11-24 11:34:46 -0800281http_archive(
282 name = "platforms",
Philipp Schraderea74b602022-02-05 16:13:12 -0800283 sha256 = "2c8d8347427e6bb0ba7cf9f933c08fe2be2b62ff2454546ad852f7bf267aad87",
284 strip_prefix = "platforms-e658a6af526089406d0057160542597501ba65d7",
285 url = "https://github.com/bazelbuild/platforms/archive/e658a6af526089406d0057160542597501ba65d7.zip",
Philipp Schraderdada1072020-11-24 11:34:46 -0800286)
287
288http_archive(
289 name = "bazel_skylib",
Austin Schuh4c3b4f02020-12-21 11:51:42 -0800290 sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
Philipp Schraderdada1072020-11-24 11:34:46 -0800291 urls = [
292 "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
293 "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
294 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800295)
296
Austin Schuhf093fa52019-06-23 20:47:23 -0700297http_archive(
Brian Silverman7bda6212018-08-05 11:42:11 -0700298 name = "python_repo",
Austin Schuhf093fa52019-06-23 20:47:23 -0700299 build_file = "@//debian:python.BUILD",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800300 sha256 = "048c51872f9c3853ae4e961c710533f477194a3f170b454e8d582f32a83e90f5",
301 url = "https://www.frc971.org/Build-Dependencies/python-6.tar.gz",
Philipp Schrader9b1790e2018-03-10 20:21:30 -0800302)
303
Austin Schuh7466fe12020-12-29 23:01:47 -0800304http_archive(
305 name = "com_github_stevengj_nlopt",
306 build_file = "@//debian:nlopt.BUILD",
307 patch_args = ["-p1"],
308 patches = ["//debian:nlopt.patch"],
309 sha256 = "2d65815b21c30813499fe19c63947f7da56b10c0d4a459dce05417899b43e461",
310 strip_prefix = "nlopt-496be736b8b249273838b891f4c8ca3669551127",
311 url = "https://www.frc971.org/Build-Dependencies/nlopt-496be736b8b249273838b891f4c8ca3669551127.zip",
312)
313
Austin Schuhd57edc42019-09-21 17:52:38 -0700314local_repository(
315 name = "com_google_absl",
316 path = "third_party/abseil",
Austin Schuh36244a12019-09-21 17:52:38 -0700317)
318
Alex Perrycb7da4b2019-08-28 19:35:56 -0700319local_repository(
320 name = "org_tuxfamily_eigen",
321 path = "third_party/eigen",
322)
323
James Kuszmaulbc02ff42021-01-15 20:41:30 -0800324local_repository(
325 name = "com_github_rawrtc_re",
326 path = "third_party/rawrtc/re",
327)
328
329local_repository(
330 name = "com_github_rawrtc_rew",
331 path = "third_party/rawrtc/rew",
332)
333
334local_repository(
335 name = "com_github_rawrtc_usrsctp",
336 path = "third_party/rawrtc/usrsctp",
337)
338
339local_repository(
340 name = "com_github_rawrtc_rawrtc_common",
341 path = "third_party/rawrtc/rawrtc-common",
342)
343
344local_repository(
345 name = "com_github_rawrtc_rawrtc_data_channel",
346 path = "third_party/rawrtc/rawrtc-data-channel",
347)
348
349local_repository(
350 name = "com_github_rawrtc_rawrtc",
351 path = "third_party/rawrtc/rawrtc",
352)
353
Austin Schuh0ca51f32020-12-25 21:51:45 -0800354http_archive(
355 name = "boringssl",
356 patch_args = ["-p1"],
357 patches = ["//debian:boringssl.patch"],
358 sha256 = "bcab08a22c28f5322316542aa2c3a9ef0a9f9fde9be22d489cee574867b24675",
359 strip_prefix = "boringssl-613fe9dbe74b58d6aaaf0d22fe57dccd964c7413",
360 urls = ["https://www.frc971.org/Build-Dependencies/boringssl-613fe9dbe74b58d6aaaf0d22fe57dccd964c7413.zip"],
361)
362
Austin Schuh36244a12019-09-21 17:52:38 -0700363# C++ rules for Bazel.
364http_archive(
365 name = "rules_cc",
Austin Schuh968174a2021-03-31 20:04:01 -0700366 sha256 = "ed36cc7a6f46b7c28ab4009db4a37e350e1ba367446b0886bcc9cdc1df92752e",
367 strip_prefix = "rules_cc-608c7b605fb844a20e96a3eddc9b49ad2542adab",
Austin Schuh36244a12019-09-21 17:52:38 -0700368 urls = [
Austin Schuh968174a2021-03-31 20:04:01 -0700369 "https://www.frc971.org/Build-Dependencies/rules_cc-608c7b605fb844a20e96a3eddc9b49ad2542adab.zip",
Austin Schuh36244a12019-09-21 17:52:38 -0700370 ],
371)
Austin Schuhd57edc42019-09-21 17:52:38 -0700372
James Kuszmaulf4bf9fe2021-05-10 22:58:24 -0700373# Note that rules_python is currently only imported to make googletest happy.
374# TODO: add frc971.org URL
375http_archive(
376 name = "rules_python",
Philipp Schrader530e3ae2021-12-04 20:13:16 -0800377 sha256 = "895fa3b03898d7708eb50ed34dcfb71c07866433df6912a6ff4f4fb473048f99",
378 strip_prefix = "rules_python-2b1d6beb4d5d8f59d629597e30e9aa519182d9a9",
379 url = "https://github.com/bazelbuild/rules_python/archive/2b1d6beb4d5d8f59d629597e30e9aa519182d9a9.tar.gz",
James Kuszmaulf4bf9fe2021-05-10 22:58:24 -0700380)
381
Austin Schuh4759ffc2015-10-07 20:39:56 -0700382new_local_repository(
Brian Silverman7bda6212018-08-05 11:42:11 -0700383 name = "usr_repo",
Austin Schuhf093fa52019-06-23 20:47:23 -0700384 build_file = "@//debian:usr.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700385 path = "/usr",
Austin Schuh4759ffc2015-10-07 20:39:56 -0700386)
387
Austin Schuh1f9aeb42015-11-12 23:34:49 -0800388new_git_repository(
Brian Silverman7bda6212018-08-05 11:42:11 -0700389 name = "slycot_repo",
Tyler Chatow2584bb12018-10-27 20:48:35 -0700390 build_file = "@//debian:slycot.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700391 commit = "5af5f283cb23cbe23c4dfea4d5e56071bdbd6e70",
392 remote = "https://github.com/avventi/Slycot.git",
Austin Schuh1f9aeb42015-11-12 23:34:49 -0800393)
394
Austin Schuh9950f682021-11-06 15:27:58 -0700395# TODO(austin): https://github.com/wpilibsuite/roborio-toolchain/releases/tag/v2022-1
Austin Schuhf093fa52019-06-23 20:47:23 -0700396http_archive(
Brian Silverman7bda6212018-08-05 11:42:11 -0700397 name = "arm_frc_linux_gnueabi_repo",
Austin Schuhf093fa52019-06-23 20:47:23 -0700398 build_file = "@//tools/cpp/arm-frc-linux-gnueabi:arm-frc-linux-gnueabi.BUILD",
Austin Schuhe991fe22020-11-18 16:53:39 -0800399 patches = ["//debian:fts.patch"],
James Kuszmaul3ae42262019-11-08 12:33:41 -0800400 sha256 = "043a5b047c2af9cf80d146d8327b588264c98a01e0f3f41e3564dd2bbbc95c0e",
401 strip_prefix = "frc2020/roborio/",
Austin Schuha5778ae2020-10-21 21:15:35 -0700402 url = "https://www.frc971.org/Build-Dependencies/FRC-2020-Linux-Toolchain-7.3.0.tar.gz",
Austin Schuh55139fe2015-10-14 23:55:24 -0700403)
Austin Schuhe456f152015-11-27 13:44:39 -0800404
Brian Silverman4c7235a2021-11-17 19:04:37 -0800405# 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
406# The following files and folders are removed to make bazel happy with it:
Brian Silvermanbf4c1312020-01-12 11:35:45 -0800407# usr/share/ca-certificates
Brian Silverman4c7235a2021-11-17 19:04:37 -0800408# lib/systemd/system/system-systemd\\x2dcryptsetup.slice
Brian Silvermanbf4c1312020-01-12 11:35:45 -0800409http_archive(
410 name = "armhf_debian_rootfs",
Brian Silverman60606c92020-01-15 22:45:04 -0800411 build_file = "@//:compilers/debian_rootfs.BUILD",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800412 sha256 = "734f26a0cfc943cc3cae88412536186adfc4ed148cc167e6ffb298497c686280",
413 url = "https://www.frc971.org/Build-Dependencies/2021-10-30-raspios-bullseye-armhf-lite_rootfs.tar.bz2",
Brian Silvermanbf4c1312020-01-12 11:35:45 -0800414)
415
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800416# 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
417# The following files and folders are removed to make bazel happy with it:
418# usr/share/ca-certificates
419# lib/systemd/system/system-systemd\\x2dcryptsetup.slice
420http_archive(
421 name = "arm64_debian_rootfs",
422 build_file = "@//:compilers/debian_rootfs.BUILD",
423 sha256 = "7e6ad432fec0a36f8b66c3fc2ab8795ea446e61f7dce7a206b55602677cf0904",
424 url = "https://www.frc971.org/Build-Dependencies/2021-10-30-raspios-bullseye-arm64-lite_rootfs.tar.bz2",
425)
426
Brian Silverman60606c92020-01-15 22:45:04 -0800427# Created with:
428# `debootstrap buster buster_sysroot`
429# and then chrooting in and running:
430# apt install libc6-dev libstdc++-7-dev
Brian Silverman4c7235a2021-11-17 19:04:37 -0800431# removing the apt cache,
Brian Silverman60606c92020-01-15 22:45:04 -0800432# and then tarring up the result
433http_archive(
434 name = "amd64_debian_sysroot",
435 build_file = "@//:compilers/debian_rootfs.BUILD",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800436 sha256 = "5e10f4cac85a98a39da1716b218bc05fff4666c61cc471a7df27876710bc86d2",
437 url = "https://www.frc971.org/Build-Dependencies/2022-01-06-debian-bullseye_rootfs.tar.bz2",
Brian Silverman60606c92020-01-15 22:45:04 -0800438)
439
Austin Schuhe456f152015-11-27 13:44:39 -0800440new_git_repository(
Brian Silverman7bda6212018-08-05 11:42:11 -0700441 name = "python_gflags_repo",
Tyler Chatow2584bb12018-10-27 20:48:35 -0700442 build_file = "@//debian:gflags.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700443 commit = "41c4571864f0db5823e07715317e7388e94faabc",
444 remote = "https://github.com/gflags/python-gflags.git",
Austin Schuhe456f152015-11-27 13:44:39 -0800445)
446
447bind(
Brian Silverman7bda6212018-08-05 11:42:11 -0700448 name = "python-gflags",
449 actual = "@python_gflags_repo//:gflags",
Austin Schuhe456f152015-11-27 13:44:39 -0800450)
451
Brian Silverman16a923c2018-10-31 19:40:51 -0700452local_repository(
453 name = "com_github_gflags_gflags",
454 path = "third_party/gflags",
455)
456
Brian Silverman8d644032020-02-02 12:15:43 -0800457# Downloaded from:
458# https://pypi.python.org/packages/source/g/glog/glog-0.1.tar.gz
Austin Schuhf093fa52019-06-23 20:47:23 -0700459http_archive(
Brian Silverman7bda6212018-08-05 11:42:11 -0700460 name = "python_glog_repo",
Austin Schuhf093fa52019-06-23 20:47:23 -0700461 build_file = "@//debian:glog.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700462 sha256 = "953fd80122c48023d1148e6d1bda2763fcab59c8a81682bb298238a5935547b0",
463 strip_prefix = "glog-0.1",
Austin Schuha5778ae2020-10-21 21:15:35 -0700464 url = "https://www.frc971.org/Build-Dependencies/glog-0.1.tar.gz",
Austin Schuhe456f152015-11-27 13:44:39 -0800465)
466
467bind(
Brian Silverman7bda6212018-08-05 11:42:11 -0700468 name = "python-glog",
469 actual = "@python_glog_repo//:glog",
Austin Schuhe456f152015-11-27 13:44:39 -0800470)
Brian Silvermancee260a2015-12-24 16:27:51 -0800471
Brian Silverman82a12b92019-01-19 21:52:10 -0800472# Generated with:
Austin Schuh9950f682021-11-06 15:27:58 -0700473# git fetch https://github.com/wpilibsuite/ni-libraries main
Austin Schuhd3c72912022-02-22 18:05:32 -0800474# git archive --output=allwpilib_ni-libraries_776db4e8aed31a651fa2f590e7468c69b384b42a.tar.gz --format=tar.gz 776db4e8aed31a651fa2f590e7468c69b384b42a
Austin Schuhf093fa52019-06-23 20:47:23 -0700475http_archive(
James Kuszmaulc9c46b32019-12-08 21:10:00 -0800476 name = "allwpilib_ni_libraries",
477 build_file = "@//debian:ni-libraries.BUILD",
Austin Schuhd3c72912022-02-22 18:05:32 -0800478 sha256 = "525b9d777cd00091b9095893c2e4fd0a70c7609c76db161161d407769ad4ba74",
479 url = "https://www.frc971.org/Build-Dependencies/allwpilib_ni-libraries_776db4e8aed31a651fa2f590e7468c69b384b42a.tar.gz",
Brian Silverman82a12b92019-01-19 21:52:10 -0800480)
481
Brian Silverman3fca9d72016-02-20 02:32:51 -0500482# Downloaded from:
483# https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz
Austin Schuhf093fa52019-06-23 20:47:23 -0700484http_archive(
Brian Silverman7bda6212018-08-05 11:42:11 -0700485 name = "six_repo",
Austin Schuhf093fa52019-06-23 20:47:23 -0700486 build_file = "@//debian:six.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700487 sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
488 strip_prefix = "six-1.10.0",
Austin Schuha5778ae2020-10-21 21:15:35 -0700489 url = "https://www.frc971.org/Build-Dependencies/six-1.10.0.tar.gz",
Brian Silverman3fca9d72016-02-20 02:32:51 -0500490)
491
492# For protobuf. Don't use these.
493bind(
Brian Silverman7bda6212018-08-05 11:42:11 -0700494 name = "six",
495 actual = "@six_repo//:six",
Brian Silverman3fca9d72016-02-20 02:32:51 -0500496)
Brian Silverman7bda6212018-08-05 11:42:11 -0700497
Brian Silverman3fca9d72016-02-20 02:32:51 -0500498bind(
Brian Silverman7bda6212018-08-05 11:42:11 -0700499 name = "gtest",
500 actual = "//third_party/googletest:googlemock",
Brian Silverman3fca9d72016-02-20 02:32:51 -0500501)
Brian Silverman7bda6212018-08-05 11:42:11 -0700502
Brian Silverman3fca9d72016-02-20 02:32:51 -0500503bind(
Brian Silverman7bda6212018-08-05 11:42:11 -0700504 name = "gtest_main",
505 actual = "//third_party/googletest:googlemock_main",
Brian Silverman3fca9d72016-02-20 02:32:51 -0500506)
507
Brian Silverman4aa83042018-01-05 12:47:31 -0800508# Recompressed from libusb-1.0.21.7z.
509http_file(
Brian Silverman7bda6212018-08-05 11:42:11 -0700510 name = "libusb_1_0_windows",
Austin Schuh4ac96a82019-08-14 20:24:23 -0700511 downloaded_file_path = "libusb-1.0.21-windows.tar.xz",
Brian Silverman7bda6212018-08-05 11:42:11 -0700512 sha256 = "fc2ba03992f343aabbaf9eb90559c6e00cdc6a2bd914d7cebea85857d5244015",
Austin Schuha5778ae2020-10-21 21:15:35 -0700513 urls = ["https://www.frc971.org/Build-Dependencies/libusb-1.0.21-windows.tar.xz"],
Brian Silverman4aa83042018-01-05 12:47:31 -0800514)
Brian Silvermand3ad1652018-02-18 22:16:29 -0500515
516# The data tarball of the same-named Debian package.
Austin Schuhf093fa52019-06-23 20:47:23 -0700517http_archive(
Brian Silvermand3ad1652018-02-18 22:16:29 -0500518 name = "f2c",
Austin Schuhf093fa52019-06-23 20:47:23 -0700519 build_file = "@//debian:f2c.BUILD",
Brian Silvermand3ad1652018-02-18 22:16:29 -0500520 sha256 = "2c677437f8217a2e2b23e41b33995d0571644fc1bea46de858f8913a5053e3f4",
Austin Schuha5778ae2020-10-21 21:15:35 -0700521 url = "https://www.frc971.org/Build-Dependencies/f2c_20100827-1_amd64.xz.tar.xz",
Brian Silvermand3ad1652018-02-18 22:16:29 -0500522)
523
524# Downloaded from http://www.netlib.org/clapack/.
Austin Schuhf093fa52019-06-23 20:47:23 -0700525http_archive(
Brian Silverman7bda6212018-08-05 11:42:11 -0700526 name = "clapack",
Austin Schuhf093fa52019-06-23 20:47:23 -0700527 build_file = "@//debian:clapack.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700528 sha256 = "6dc4c382164beec8aaed8fd2acc36ad24232c406eda6db462bd4c41d5e455fac",
529 strip_prefix = "CLAPACK-3.2.1/",
Austin Schuha5778ae2020-10-21 21:15:35 -0700530 url = "https://www.frc971.org/Build-Dependencies/clapack-3.2.1.tgz",
Brian Silverman7bda6212018-08-05 11:42:11 -0700531)
532
Austin Schuhf093fa52019-06-23 20:47:23 -0700533http_archive(
Philipp Schrader41011a12022-03-13 12:49:32 -0700534 name = "postgresql_amd64",
535 build_file = "@//debian:postgresql_amd64.BUILD",
536 sha256 = "2b8bb77deaf58f798c296ce31ee7a32781395d55e05dcddc8a7da7e827f38d7f",
537 url = "https://www.frc971.org/Build-Dependencies/postgresql_amd64.tar.gz",
538)
539
540http_archive(
Brian Silverman7bda6212018-08-05 11:42:11 -0700541 name = "patch",
Austin Schuhf093fa52019-06-23 20:47:23 -0700542 build_file = "@//debian:patch.BUILD",
Brian Silverman7bda6212018-08-05 11:42:11 -0700543 sha256 = "b5ce139648a2e04f5585948ddad2fdae24dd4ee7976ac5a22d6ae7bd5674631e",
Austin Schuha5778ae2020-10-21 21:15:35 -0700544 url = "https://www.frc971.org/Build-Dependencies/patch.tar.gz",
Brian Silvermand3ad1652018-02-18 22:16:29 -0500545)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700546
Austin Schuhf093fa52019-06-23 20:47:23 -0700547http_archive(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700548 name = "rsync",
549 build_file = "@//debian:rsync.BUILD",
550 sha256 = "53be65a9214aaa6d1b9176f135184fb4a78ccefd58f95ce0da37e6a392dfeb60",
Austin Schuha5778ae2020-10-21 21:15:35 -0700551 url = "https://www.frc971.org/Build-Dependencies/rsync.tar.gz",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700552)
553
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800554# //debian:ssh
Austin Schuh71f6fa72019-08-31 18:23:02 -0700555http_archive(
556 name = "ssh",
557 build_file = "@//debian:ssh.BUILD",
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800558 sha256 = "470fdc1252a2133a9d3c3da778e892a5b88f04f402cb04d8eb1cff7853242034",
Austin Schuha5778ae2020-10-21 21:15:35 -0700559 url = "https://www.frc971.org/Build-Dependencies/ssh_v3.tar.gz",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700560)
561
562http_archive(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800563 name = "apache2",
564 build_file = "@//debian:apache2.BUILD",
565 sha256 = "98b0ad6d911751ba0aa486429e6278f995e7bbabd928c7d3d44c888fa2bf371b",
566 url = "https://www.frc971.org/Build-Dependencies/apache2.tar.gz",
567)
568
569http_archive(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700570 name = "pandoc",
Austin Schuhf093fa52019-06-23 20:47:23 -0700571 build_file = "@//debian:pandoc.BUILD",
Brian Silverman7297c0c2018-08-05 13:43:00 -0700572 sha256 = "9f7a7adb3974a1f14715054c349ff3edc2909e920dbe3438fca437a83845f3c4",
Austin Schuha5778ae2020-10-21 21:15:35 -0700573 url = "https://www.frc971.org/Build-Dependencies/pandoc.tar.gz",
Brian Silverman7297c0c2018-08-05 13:43:00 -0700574)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700575
Austin Schuhf093fa52019-06-23 20:47:23 -0700576http_archive(
Brian Silverman4f6ba442018-08-05 14:34:58 -0700577 name = "libusb",
Austin Schuhf093fa52019-06-23 20:47:23 -0700578 build_file = "@//debian:libusb.BUILD",
Brian Silverman4f6ba442018-08-05 14:34:58 -0700579 sha256 = "3ca5cc2d317226f6646866ff9e8c443db3b0f6c82f828e800240982727531590",
Austin Schuha5778ae2020-10-21 21:15:35 -0700580 url = "https://www.frc971.org/Build-Dependencies/libusb.tar.gz",
Brian Silverman4f6ba442018-08-05 14:34:58 -0700581)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700582
Austin Schuhf093fa52019-06-23 20:47:23 -0700583http_archive(
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700584 name = "mingw_compiler",
Austin Schuhf093fa52019-06-23 20:47:23 -0700585 build_file = "@//debian:mingw_compiler.BUILD",
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700586 sha256 = "45e86a8460f2151a4f0306e7ae7b06761029d2412ee16f63d1e8d2d29354e378",
Austin Schuha5778ae2020-10-21 21:15:35 -0700587 url = "https://www.frc971.org/Build-Dependencies/mingw_compiler.tar.gz",
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700588)
Brian Silverman6470f442018-08-05 12:08:16 -0700589
James Kuszmaul910f92b2020-01-01 15:30:38 -0800590# Note that we should generally keep the matplotlib repo in a folder not
591# named matplotlib, because otherwise the repository itself tends to end up
592# on the PYTHONPATH, rather than the matplotlib folder within this repo.
Austin Schuhf093fa52019-06-23 20:47:23 -0700593http_archive(
James Kuszmaul910f92b2020-01-01 15:30:38 -0800594 name = "matplotlib_repo",
Austin Schuhf093fa52019-06-23 20:47:23 -0700595 build_file = "@//debian:matplotlib.BUILD",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800596 sha256 = "71d1512f1a9a3c90496f0ef3adcd46c4e5e4da4310d7cbb6b0da01a07e5e76e8",
597 url = "https://www.frc971.org/Build-Dependencies/matplotlib-6.tar.gz",
Brian Silverman6470f442018-08-05 12:08:16 -0700598)
599
Austin Schuhf093fa52019-06-23 20:47:23 -0700600http_archive(
Brian Silverman6470f442018-08-05 12:08:16 -0700601 name = "patchelf",
Austin Schuhf093fa52019-06-23 20:47:23 -0700602 build_file = "@//debian:patchelf.BUILD",
Brian Silverman6470f442018-08-05 12:08:16 -0700603 sha256 = "bf8b709909d7d9e30815dd228eeded7dc282e3ce3919d0589ccbb56ac8632abc",
Austin Schuha5778ae2020-10-21 21:15:35 -0700604 url = "https://www.frc971.org/Build-Dependencies/patchelf.tar.gz",
Brian Silverman6470f442018-08-05 12:08:16 -0700605)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700606
Austin Schuhf093fa52019-06-23 20:47:23 -0700607http_archive(
Brian Silverman50b9ac02018-08-12 13:24:10 -0700608 name = "arm_frc_gnueabi_deps",
Austin Schuhf093fa52019-06-23 20:47:23 -0700609 build_file = "@//debian:arm_frc_gnueabi_deps.BUILD",
Brian Silverman50b9ac02018-08-12 13:24:10 -0700610 sha256 = "4b26fe45010817dc136488ee1604ade21bd7c264c29f17d864fc6eba9d7442c4",
Austin Schuha5778ae2020-10-21 21:15:35 -0700611 url = "https://www.frc971.org/Build-Dependencies/arm_frc_gnueabi_deps.tar.gz",
Brian Silverman50b9ac02018-08-12 13:24:10 -0700612)
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700613
Austin Schuhf093fa52019-06-23 20:47:23 -0700614http_archive(
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700615 name = "python_gtk",
Austin Schuhf093fa52019-06-23 20:47:23 -0700616 build_file = "@//debian:python_gtk.BUILD",
Philipp Schraderc3670b82022-02-22 19:11:30 -0800617 sha256 = "36db18fc2b2c9012312b5d1cdc3d392d7e9756040f759ea50cb623fea29ae817",
618 url = "https://www.frc971.org/Build-Dependencies/python_gtk-4.tar.gz",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700619)
620
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700621# Downloaded from
622# 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 -0700623http_archive(
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700624 name = "gcc_arm_none_eabi",
Austin Schuhf093fa52019-06-23 20:47:23 -0700625 build_file = "@//:compilers/gcc_arm_none_eabi.BUILD",
Brian Silverman6c8b88b2018-09-03 18:17:02 -0700626 sha256 = "bb17109f0ee697254a5d4ae6e5e01440e3ea8f0277f2e8169bf95d07c7d5fe69",
627 strip_prefix = "gcc-arm-none-eabi-7-2018-q2-update/",
Austin Schuha5778ae2020-10-21 21:15:35 -0700628 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 -0700629)
Austin Schuhad596222018-01-31 23:34:03 -0800630
Austin Schuhe18baff2018-10-20 17:40:42 -0700631# Java9 JDK.
Philipp Schrader6efe5732022-02-12 15:11:13 -0800632remote_java_repository(
Austin Schuhe18baff2018-10-20 17:40:42 -0700633 name = "openjdk_linux_archive",
Philipp Schrader6efe5732022-02-12 15:11:13 -0800634 exec_compatible_with = [
635 "@platforms//cpu:x86_64",
636 "@platforms//os:linux",
637 ],
638 prefix = "openjdk",
Austin Schuhe18baff2018-10-20 17:40:42 -0700639 sha256 = "f27cb933de4f9e7fe9a703486cf44c84bc8e9f138be0c270c9e5716a32367e87",
640 strip_prefix = "zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules",
641 urls = [
Austin Schuha5778ae2020-10-21 21:15:35 -0700642 "https://www.frc971.org/Build-Dependencies/zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz",
Austin Schuhe18baff2018-10-20 17:40:42 -0700643 ],
Philipp Schrader6efe5732022-02-12 15:11:13 -0800644 version = "9",
Austin Schuhe18baff2018-10-20 17:40:42 -0700645)
646
Austin Schuhf9724442018-10-28 20:30:21 -0700647local_repository(
648 name = "com_google_protobuf",
649 path = "third_party/protobuf",
Brian Silverman9c614bc2016-02-15 20:20:02 -0500650)
Austin Schuh10358f22019-01-21 20:25:11 -0800651
652local_repository(
653 name = "com_github_google_glog",
654 path = "third_party/google-glog",
655)
Austin Schuh6defdeb2019-01-21 21:00:30 -0800656
Alex Perrycb7da4b2019-08-28 19:35:56 -0700657local_repository(
658 name = "com_google_googletest",
659 path = "third_party/googletest",
660)
661
Austin Schuh6defdeb2019-01-21 21:00:30 -0800662# External dependency: Google Benchmark; has no Bazel build.
663local_repository(
664 name = "com_github_google_benchmark",
665 path = "third_party/google-benchmark",
Austin Schuhcbc17402019-01-21 21:00:30 -0800666)
Austin Schuh033df092019-01-21 19:46:48 -0800667
668local_repository(
669 name = "com_google_ceres_solver",
670 path = "third_party/ceres",
Austin Schuh70cc9552019-01-21 19:46:48 -0800671)
Austin Schuhf6b94632019-02-02 22:11:27 -0800672
Austin Schuhf093fa52019-06-23 20:47:23 -0700673http_archive(
James Kuszmaul02eb05e2019-12-22 12:32:18 -0800674 name = "ctre_phoenix_api_cpp_headers",
Austin Schuhf6b94632019-02-02 22:11:27 -0800675 build_file_content = """
676cc_library(
677 name = 'api-cpp',
678 visibility = ['//visibility:public'],
679 hdrs = glob(['ctre/phoenix/**/*.h']),
680)
681""",
Austin Schuhde605f12022-02-23 23:08:19 -0800682 sha256 = "ea4131d1809bc8ccbd72b15cc7a65bd6ebb89a65019afc6a336e2c92d91ec824",
Austin Schuhf6b94632019-02-02 22:11:27 -0800683 urls = [
Austin Schuhde605f12022-02-23 23:08:19 -0800684 "http://devsite.ctr-electronics.com/maven/release/com/ctre/phoenix/api-cpp/5.21.1/api-cpp-5.21.1-headers.zip",
Austin Schuhf6b94632019-02-02 22:11:27 -0800685 ],
686)
687
Austin Schuhf093fa52019-06-23 20:47:23 -0700688http_archive(
James Kuszmaul02eb05e2019-12-22 12:32:18 -0800689 name = "ctre_phoenix_api_cpp_athena",
Austin Schuhf6b94632019-02-02 22:11:27 -0800690 build_file_content = """
Austin Schuhde605f12022-02-23 23:08:19 -0800691filegroup(
692 name = 'shared_libraries',
693 srcs = [
694 'linux/athena/shared/libCTRE_Phoenix.so',
695 ],
696 visibility = ['//visibility:public'],
697)
698
Austin Schuhf6b94632019-02-02 22:11:27 -0800699cc_library(
700 name = 'api-cpp',
701 visibility = ['//visibility:public'],
Austin Schuhde605f12022-02-23 23:08:19 -0800702 srcs = ['linux/athena/shared/libCTRE_Phoenix.so'],
Philipp Schraderdada1072020-11-24 11:34:46 -0800703 target_compatible_with = ['@//tools/platforms/hardware:roborio'],
Austin Schuhf6b94632019-02-02 22:11:27 -0800704)
705""",
Austin Schuhde605f12022-02-23 23:08:19 -0800706 sha256 = "328130012a0fc1050c3ff09f30a2adf5106d15accc3d850b744fa60ec635a462",
Austin Schuhf6b94632019-02-02 22:11:27 -0800707 urls = [
Austin Schuhde605f12022-02-23 23:08:19 -0800708 "http://devsite.ctr-electronics.com/maven/release/com/ctre/phoenix/api-cpp/5.21.1/api-cpp-5.21.1-linuxathena.zip",
Austin Schuhf6b94632019-02-02 22:11:27 -0800709 ],
710)
711
James Kuszmaul02eb05e2019-12-22 12:32:18 -0800712http_archive(
713 name = "ctre_phoenix_cci_headers",
Austin Schuhf6b94632019-02-02 22:11:27 -0800714 build_file_content = """
715cc_library(
716 name = 'cci',
717 visibility = ['//visibility:public'],
718 hdrs = glob(['ctre/phoenix/**/*.h']),
719)
720""",
Austin Schuhde605f12022-02-23 23:08:19 -0800721 sha256 = "b3332885c6afe082f9f67c2335086e89f705b6ac6c5101188616f81c58d3e49a",
Austin Schuhf6b94632019-02-02 22:11:27 -0800722 urls = [
Austin Schuhde605f12022-02-23 23:08:19 -0800723 "http://devsite.ctr-electronics.com/maven/release/com/ctre/phoenix/cci/5.21.1/cci-5.21.1-headers.zip",
Austin Schuhf6b94632019-02-02 22:11:27 -0800724 ],
725)
726
Austin Schuhf093fa52019-06-23 20:47:23 -0700727http_archive(
James Kuszmaul02eb05e2019-12-22 12:32:18 -0800728 name = "ctre_phoenix_cci_athena",
Austin Schuhf6b94632019-02-02 22:11:27 -0800729 build_file_content = """
Austin Schuhde605f12022-02-23 23:08:19 -0800730filegroup(
731 name = 'shared_libraries',
732 srcs = [
733 'linux/athena/shared/libCTRE_PhoenixCCI.so',
734 ],
735 visibility = ['//visibility:public'],
736)
737
Austin Schuhf6b94632019-02-02 22:11:27 -0800738cc_library(
739 name = 'cci',
740 visibility = ['//visibility:public'],
Austin Schuhde605f12022-02-23 23:08:19 -0800741 srcs = ['linux/athena/shared/libCTRE_PhoenixCCI.so'],
Philipp Schraderdada1072020-11-24 11:34:46 -0800742 target_compatible_with = ['@//tools/platforms/hardware:roborio'],
Austin Schuhf6b94632019-02-02 22:11:27 -0800743)
744""",
Austin Schuhde605f12022-02-23 23:08:19 -0800745 sha256 = "94812541734d7905774d97e10a97e9c79b5c37cba60d9b6b2d6e4bf3bbabc2fb",
Austin Schuhf6b94632019-02-02 22:11:27 -0800746 urls = [
Austin Schuhde605f12022-02-23 23:08:19 -0800747 "http://devsite.ctr-electronics.com/maven/release/com/ctre/phoenix/cci/5.21.1/cci-5.21.1-linuxathena.zip",
Austin Schuhf6b94632019-02-02 22:11:27 -0800748 ],
749)
Austin Schuheed14442019-03-23 14:42:46 -0700750
751http_archive(
Austin Schuhda9d0602019-09-15 17:29:38 -0700752 name = "build_bazel_rules_nodejs",
Philipp Schrader87277f42022-01-01 07:45:12 -0800753 sha256 = "cfc289523cf1594598215901154a6c2515e8bf3671fd708264a6f6aefe02bf39",
754 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 -0700755)
Austin Schuheed14442019-03-23 14:42:46 -0700756
Philipp Schrader87277f42022-01-01 07:45:12 -0800757load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")
Austin Schuheed14442019-03-23 14:42:46 -0700758
759node_repositories()
760
761# Setup Bazel managed npm dependencies with the `yarn_install` rule.
Philipp Schrader87277f42022-01-01 07:45:12 -0800762
Austin Schuhda9d0602019-09-15 17:29:38 -0700763# To run yarn by hand, use:
764# bazel run @nodejs_linux_amd64//:bin/yarn -- list
765# I'm sure there is a better path, but that works...
Austin Schuheed14442019-03-23 14:42:46 -0700766yarn_install(
767 name = "npm",
Alex Perryeddc18c2022-01-29 16:22:41 -0800768 frozen_lockfile = True,
Austin Schuheed14442019-03-23 14:42:46 -0700769 package_json = "//:package.json",
Philipp Schraderb48f8ea2022-03-13 20:59:54 -0700770 patch_args = ["-p1"],
771 post_install_patches = [
772 "//third_party:npm/@bazel/protractor/bazel-protractor.patch",
773 ],
Austin Schuhda9d0602019-09-15 17:29:38 -0700774 symlink_node_modules = False,
Austin Schuheed14442019-03-23 14:42:46 -0700775 yarn_lock = "//:yarn.lock",
776)
Austin Schuh4ac96a82019-08-14 20:24:23 -0700777
Philipp Schrader54047962022-02-16 21:05:11 -0800778load("@build_bazel_rules_nodejs//toolchains/esbuild:esbuild_repositories.bzl", "esbuild_repositories")
779
780esbuild_repositories(npm_repository = "npm")
781
Alex Perryb3168082022-01-22 13:36:13 -0800782http_archive(
783 name = "io_bazel_rules_webtesting",
Philipp Schrader54047962022-02-16 21:05:11 -0800784 patch_args = ["-p1"],
785 patches = [
786 "@//third_party:rules_webtesting/rules_webtesting.patch",
787 ],
Alex Perryb3168082022-01-22 13:36:13 -0800788 sha256 = "e9abb7658b6a129740c0b3ef6f5a2370864e102a5ba5ffca2cea565829ed825a",
789 urls = ["https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.5/rules_webtesting.tar.gz"],
790)
791
Ravago Jones16809802021-11-18 20:40:03 -0800792http_archive(
793 name = "rules_rust",
794 sha256 = "531bdd470728b61ce41cf7604dc4f9a115983e455d46ac1d0c1632f613ab9fc3",
795 strip_prefix = "rules_rust-d8238877c0e552639d3e057aadd6bfcf37592408",
796 urls = [
797 # `main` branch as of 2021-08-23
798 "https://github.com/bazelbuild/rules_rust/archive/d8238877c0e552639d3e057aadd6bfcf37592408.tar.gz",
799 ],
800)
801
802load("@rules_rust//rust:repositories.bzl", "rust_repository_set")
803
804rust_repository_set(
805 name = "rust",
806 edition = "2021",
807 exec_triple = "x86_64-unknown-linux-gnu",
808 extra_target_triples = [
809 "arm-unknown-linux-gnueabi",
810 "armv7-unknown-linux-gnueabihf",
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800811 "aarch64-unknown-linux-gnu",
Ravago Jones16809802021-11-18 20:40:03 -0800812 ],
813 version = "1.56.1",
814)
815
Philipp Schrader54047962022-02-16 21:05:11 -0800816load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
817
818web_test_repositories()
819
820load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.3.bzl", "browser_repositories")
821
822browser_repositories(chromium = True)
823
Austin Schuh4ac96a82019-08-14 20:24:23 -0700824# Flatbuffers
825local_repository(
826 name = "com_github_google_flatbuffers",
827 path = "third_party/flatbuffers",
828)
James Kuszmaul7daef362019-12-31 18:28:17 -0800829
830http_file(
831 name = "sample_logfile",
832 downloaded_file_path = "log.fbs",
milind945708b2021-07-03 13:30:15 -0700833 sha256 = "45d1d19fb82786c476d3f21a8d62742abaeeedf4c16a00ec37ae350dcb61f1fc",
834 urls = ["https://www.frc971.org/Build-Dependencies/small_sample_logfile2.fbs"],
James Kuszmaul7daef362019-12-31 18:28:17 -0800835)
Brian Silvermand4260c72020-01-14 00:08:02 -0800836
James Kuszmaul9c128122021-03-22 22:24:36 -0700837http_archive(
James Kuszmaul531609d2020-02-18 17:12:23 -0800838 name = "drivetrain_replay",
James Kuszmaul9c128122021-03-22 22:24:36 -0700839 build_file_content = """
840filegroup(
841 name = "drivetrain_replay",
842 srcs = glob(["**/*.bfbs"]),
843 visibility = ["//visibility:public"],
844)
845 """,
846 sha256 = "115dcd2fe005cb9cad3325707aa7f4466390c43a08555edf331c06c108bdf692",
847 url = "https://www.frc971.org/Build-Dependencies/2021-03-20_drivetrain_spin_wheels.tar.gz",
James Kuszmaul531609d2020-02-18 17:12:23 -0800848)
849
milind-u7baf7342021-08-25 18:31:26 -0700850http_archive(
851 name = "superstructure_replay",
852 build_file_content = """
853filegroup(
854 name = "superstructure_replay",
855 srcs = glob(["**/*.bfbs"]),
856 visibility = ["//visibility:public"],
857)
858 """,
milind-u200b2762021-11-06 19:36:15 -0700859 sha256 = "2b9a3ecc83f2aba89a1909ae38fe51e6718a5b4d0e7c131846dfb2845df9cd19",
860 url = "https://www.frc971.org/Build-Dependencies/2021-10-03_superstructure_shoot_balls.tar.gz",
milind-u7baf7342021-08-25 18:31:26 -0700861)
862
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800863# OpenCV arm64 (for raspberry pi)
864http_archive(
865 name = "opencv_arm64",
866 build_file = "@//debian:opencv.BUILD",
867 sha256 = "d284fae46ca710cf24c81ff7ace34929773466bff38f365a80371bea3b36a2ed",
868 url = "https://www.frc971.org/Build-Dependencies/opencv_arm64.tar.gz",
869)
870
Brian Silvermand4260c72020-01-14 00:08:02 -0800871# OpenCV armhf (for raspberry pi)
872http_archive(
873 name = "opencv_armhf",
874 build_file = "@//debian:opencv.BUILD",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800875 sha256 = "064165507bad1afa8f7b22961a9a9067b243abc70064d713d26b37bc8dc2bf56",
876 url = "https://www.frc971.org/Build-Dependencies/opencv_armhf_v4.tar.gz",
Brian Silvermand4260c72020-01-14 00:08:02 -0800877)
Brian Silvermand97a47c2020-01-16 00:47:53 -0800878
879http_archive(
880 name = "opencv_k8",
881 build_file = "@//debian:opencv.BUILD",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800882 sha256 = "b730f5d0c8eb59411157b4e84bfdddd3a6fceed10b842716d9d1b74ad322ea14",
883 url = "https://www.frc971.org/Build-Dependencies/opencv_amd64_v3.tar.gz",
Brian Silvermand97a47c2020-01-16 00:47:53 -0800884)
Brian Silverman764945b2020-01-16 23:40:43 -0800885
886# Downloaded from:
887# https://github.com/halide/Halide/releases/download/release_2019_08_27/halide-linux-64-gcc53-800-65c26cba6a3eca2d08a0bccf113ca28746012cc3.tgz
888# which is "Halide 2019/08/27" at https://github.com/halide/Halide/releases.
889http_archive(
890 name = "halide_k8",
891 build_file = "@//debian:halide.BUILD",
Brian Silvermanbe23ed62020-06-18 14:35:25 -0700892 sha256 = "c67185d50a99adba86f6b2cc43c7e2cf11bcdfba9052d05e764a89b456a50446",
Brian Silverman764945b2020-01-16 23:40:43 -0800893 strip_prefix = "halide/",
Austin Schuha5778ae2020-10-21 21:15:35 -0700894 url = "https://www.frc971.org/Build-Dependencies/halide-linux-64-gcc53-800-65c26cba6a3eca2d08a0bccf113ca28746012cc3.tgz",
Brian Silverman764945b2020-01-16 23:40:43 -0800895)
896
897# Downloaded from:
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800898# https://github.com/halide/Halide/releases/download/v8.0.0/halide-arm64-linux-64-trunk-65c26cba6a3eca2d08a0bccf113ca28746012cc3.tgz
899# which is "Halide 8.0.0" at https://github.com/halide/Halide/releases.
900# The "2019/08/27" release was renamed as per the release notes:
901# https://github.com/halide/Halide/releases/tag/v8.0.0
902http_archive(
903 name = "halide_arm64",
904 build_file = "@//debian:halide.BUILD",
905 sha256 = "97b3e54565cd9df52abdd6452f3720ffd38861524154d74ae3d20dc949ed2a63",
906 strip_prefix = "halide/",
907 url = "https://www.frc971.org/Build-Dependencies/halide-arm64-linux-64-trunk-65c26cba6a3eca2d08a0bccf113ca28746012cc3.tgz",
908)
909
910# Downloaded from:
Brian Silverman764945b2020-01-16 23:40:43 -0800911# https://github.com/halide/Halide/releases/download/release_2019_08_27/halide-arm32-linux-32-trunk-65c26cba6a3eca2d08a0bccf113ca28746012cc3.tgz
912# which is "Halide 2019/08/27" at https://github.com/halide/Halide/releases.
913http_archive(
914 name = "halide_armhf",
915 build_file = "@//debian:halide.BUILD",
Brian Silvermanbe23ed62020-06-18 14:35:25 -0700916 sha256 = "10564c559c9e04a173823413916d05fadd6e697d91bab21ddc5041190fa8f0f0",
Brian Silverman764945b2020-01-16 23:40:43 -0800917 strip_prefix = "halide/",
Austin Schuha5778ae2020-10-21 21:15:35 -0700918 url = "https://www.frc971.org/Build-Dependencies/halide-arm32-linux-32-trunk-65c26cba6a3eca2d08a0bccf113ca28746012cc3.tgz",
Brian Silverman764945b2020-01-16 23:40:43 -0800919)
Brian Silverman4fe44ea2020-02-02 12:56:42 -0800920
921# Downloaded from:
Austin Schuh085eab92020-11-26 13:54:51 -0800922# https://files.pythonhosted.org/packages/0f/13/192104516c4a3d92dc6b5e106ffcfbf0fe35f3c4faa49650205ff652af72/opencv_python-4.5.1.48-cp37-cp37m-manylinux2014_x86_64.whl
Brian Silverman4fe44ea2020-02-02 12:56:42 -0800923http_archive(
924 name = "opencv_contrib_nonfree_amd64",
925 build_file = "@//debian:opencv_python.BUILD",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800926 sha256 = "a1dfa0486db367594510c0c799ec7481247dc86e651b69008806d875ab731471",
Brian Silverman4fe44ea2020-02-02 12:56:42 -0800927 type = "zip",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800928 url = "https://www.frc971.org/Build-Dependencies/opencv_python-4.5.1.48-cp39-cp39-manylinux2014_x86_64.whl",
Brian Silverman4fe44ea2020-02-02 12:56:42 -0800929)
Tyler Chatow60671d32020-02-26 19:49:30 -0800930
931http_archive(
Austin Schuh2e28d872022-02-19 18:25:57 -0800932 name = "osqp_amd64",
933 build_file = "@//debian:osqp_python.BUILD",
934 sha256 = "8003fc363f707daa46fef3af548e6a580372154d6cd49a7bf2f569ba5f807d15",
935 type = "zip",
936 url = "https://files.pythonhosted.org/packages/3f/e2/f1c40e890f00f8a566bc2481d0f215e52def3dfe8eea6b8ad4cc2d3cbca2/osqp-0.6.2.post5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
937)
938
939http_archive(
940 name = "qdldl_amd64",
941 build_file = "@//debian:qdldl_python.BUILD",
942 sha256 = "2c09f4b1a1c6f3a0579af004443417e084491e7c844ff9fb73170bb5d43f70b5",
943 type = "zip",
944 url = "https://files.pythonhosted.org/packages/9e/26/ccb4f065b40c1e9ff35ee66970d4fa97dd2fe221b846da2110eb8cd6c3f4/qdldl-0.1.5.post0-cp39-cp39-manylinux2014_x86_64.whl",
945)
946
947http_archive(
Tyler Chatow60671d32020-02-26 19:49:30 -0800948 name = "gstreamer_k8",
949 build_file = "@//debian:gstreamer.BUILD",
950 sha256 = "4d74d4a82f7a73dc9fe9463d5fae409b17845eef7cd64ef9c4c4553816c53589",
Austin Schuha5778ae2020-10-21 21:15:35 -0700951 url = "https://www.frc971.org/Build-Dependencies/gstreamer_amd64.tar.gz",
Tyler Chatow60671d32020-02-26 19:49:30 -0800952)
953
954http_archive(
955 name = "gstreamer_armhf",
956 build_file = "@//debian:gstreamer.BUILD",
957 sha256 = "c5ac4c604952c274a50636e244f0d091bd1de302032446f24f0e9e03ae9c76f7",
Austin Schuha5778ae2020-10-21 21:15:35 -0700958 url = "https://www.frc971.org/Build-Dependencies/gstreamer_armhf.tar.gz",
Tyler Chatow60671d32020-02-26 19:49:30 -0800959)
James Kuszmaulc91e4402020-05-10 18:47:20 -0700960
961# Downloaded from:
962# https://files.pythonhosted.org/packages/64/a7/45e11eebf2f15bf987c3bc11d37dcc838d9dc81250e67e4c5968f6008b6c/Jinja2-2.11.2.tar.gz
963http_archive(
964 name = "python_jinja2",
965 build_file = "@//debian:python_jinja2.BUILD",
966 sha256 = "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0",
967 strip_prefix = "Jinja2-2.11.2",
Austin Schuha5778ae2020-10-21 21:15:35 -0700968 url = "https://www.frc971.org/Build-Dependencies/Jinja2-2.11.2.tar.gz",
James Kuszmaulc91e4402020-05-10 18:47:20 -0700969)
970
971# Downloaded from:
972# https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz
973http_archive(
974 name = "python_markupsafe",
975 build_file = "@//debian:python_markupsafe.BUILD",
976 sha256 = "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b",
977 strip_prefix = "MarkupSafe-1.1.1",
Austin Schuha5778ae2020-10-21 21:15:35 -0700978 url = "https://www.frc971.org/Build-Dependencies/MarkupSafe-1.1.1.tar.gz",
James Kuszmaulc91e4402020-05-10 18:47:20 -0700979)
Austin Schuh023e7f52020-08-18 21:24:37 -0700980
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700981# //debian:lzma_amd64
982http_archive(
983 name = "lzma_amd64",
984 build_file_content = """
985cc_library(
986 name = "lib",
987 srcs = [
988 "usr/lib/x86_64-linux-gnu/liblzma.a",
989 ],
990 hdrs = glob([
991 "usr/include/lzma/*.h",
992 "usr/include/*.h",
993 ]),
994 strip_include_prefix = "usr/include",
995 visibility = ["//visibility:public"],
996)
997""",
998 sha256 = "e0ccaa7f793e44638e9f89570e00f146073a98a5928e0b547146c8184488bb19",
Austin Schuha5778ae2020-10-21 21:15:35 -0700999 urls = ["https://www.frc971.org/Build-Dependencies/lzma_amd64.tar.gz"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -07001000)
1001
1002# //debian:lzma_arm64
1003http_archive(
1004 name = "lzma_arm64",
1005 build_file_content = """
1006cc_library(
1007 name = "lib",
1008 srcs = [
1009 "usr/lib/aarch64-linux-gnu/liblzma.a",
1010 ],
1011 hdrs = glob([
1012 "usr/include/lzma/*.h",
1013 "usr/include/*.h",
1014 ]),
1015 strip_include_prefix = "usr/include",
1016 visibility = ["//visibility:public"],
1017)
1018""",
1019 sha256 = "18db35669ee49a5f8324a344071dd4ab553e716f385fb75747b909bd1de959f5",
Austin Schuha5778ae2020-10-21 21:15:35 -07001020 urls = ["https://www.frc971.org/Build-Dependencies/lzma_arm64.tar.gz"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -07001021)
James Kuszmaul2cffe852021-10-27 20:17:49 -07001022
1023local_repository(
1024 name = "snappy",
1025 path = "third_party/snappy",
1026)
Philipp Schrader73e56602021-12-06 21:37:30 -08001027
1028http_archive(
1029 name = "io_bazel_rules_go",
Philipp Schrader039f5c32022-01-20 22:30:01 -08001030 patch_args = [
1031 "-p1",
1032 ],
1033 patches = [
1034 "@//third_party:rules_go/0001-Disable-warnings-for-external-repositories.patch",
1035 ],
Philipp Schrader73e56602021-12-06 21:37:30 -08001036 sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f",
1037 urls = [
1038 "https://www.frc971.org/Build-Dependencies/rules_go-v0.29.0.zip",
1039 "https://github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
1040 ],
1041)
1042
Philipp Schrader37fdbb62021-12-18 00:30:37 -08001043http_archive(
1044 name = "bazel_gazelle",
1045 sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
1046 urls = [
1047 "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
1048 "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
1049 ],
1050)
1051
Philipp Schrader73e56602021-12-06 21:37:30 -08001052load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
1053
1054go_rules_dependencies()
1055
1056go_register_toolchains(version = "1.17.1")
Philipp Schrader37fdbb62021-12-18 00:30:37 -08001057
1058load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
1059load("//:go_deps.bzl", "go_dependencies")
1060load("//tools/go:mirrored_go_deps.bzl", "mirrored_go_dependencies")
1061
1062mirrored_go_dependencies()
1063
1064# gazelle:repository_macro go_deps.bzl%go_dependencies
1065go_dependencies()
1066
1067gazelle_dependencies()
Philipp Schradercc016b32021-12-30 08:59:58 -08001068
1069http_archive(
1070 name = "com_github_bazelbuild_buildtools",
1071 sha256 = "44a6e5acc007e197d45ac3326e7f993f0160af9a58e8777ca7701e00501c0857",
1072 strip_prefix = "buildtools-4.2.4",
1073 urls = [
1074 "https://github.com/bazelbuild/buildtools/archive/refs/tags/4.2.4.tar.gz",
1075 ],
1076)
Philipp Schrader0f5d2502022-03-08 22:44:55 -08001077
1078http_archive(
1079 name = "rules_pkg",
1080 patch_args = ["-p1"],
1081 patches = [
1082 "//third_party:rules_pkg/0001-Fix-tree-artifacts.patch",
1083 ],
1084 sha256 = "62eeb544ff1ef41d786e329e1536c1d541bb9bcad27ae984d57f18f314018e66",
1085 urls = [
1086 "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.6.0/rules_pkg-0.6.0.tar.gz",
1087 "https://github.com/bazelbuild/rules_pkg/releases/download/0.6.0/rules_pkg-0.6.0.tar.gz",
1088 ],
1089)
1090
1091load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
1092
1093rules_pkg_dependencies()