-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathMODULE.bazel
More file actions
179 lines (160 loc) · 5.58 KB
/
Copy pathMODULE.bazel
File metadata and controls
179 lines (160 loc) · 5.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
"Bazel dependencies"
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
bazel_dep(name = "aspect_bazel_lib", version = "2.21.1")
bazel_dep(name = "aspect_gazelle_prebuilt", version = "0.0.8")
bazel_dep(name = "aspect_rules_lint", version = "2.5.2")
bazel_dep(name = "rules_nodejs", version = "6.7.3") # Transitive dep; bump for bazel9
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "bazelrc-preset.bzl", version = "1.9.2")
bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.2")
bazel_dep(name = "gazelle", version = "0.45.0") # for the build-from-source `//tools/gazelle:gazelle_from_source` regression target; the prebuilt binary is what most users will want
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_cc", version = "0.2.16") # referenced by .bazelrc (use_libtool_on_macos flag)
bazel_dep(name = "rules_go", version = "0.59.0") # toolchain for the build-from-source gazelle regression target; also a transitive dep via aspect_rules_lint→rules_buf
bazel_dep(name = "rules_pkg", version = "1.1.0")
bazel_dep(name = "rules_python", version = "2.0.1") # for the //examples/deliverable py_binary delivery e2e fixture
bazel_dep(name = "rules_shell", version = "0.7.1")
bazel_dep(name = "with_cfg.bzl", version = "0.12.0")
bazel_dep(name = "toolchains_llvm_bootstrapped", version = "0.5.2")
register_toolchains("@toolchains_llvm_bootstrapped//toolchain:all")
bazel_dep(name = "rules_rs", version = "0.0.27")
# Special toolchains branch
archive_override(
module_name = "rules_rs",
integrity = "sha256-YbDRjZos4UmfIPY98znK1BgBWRQ1/ui3CtL6RqxE30I=",
strip_prefix = "rules_rs-6cf3d940fdc48baf3ebd6c37daf8e0be8fc73ecb",
url = "https://github.com/dzbarsky/rules_rs/archive/6cf3d940fdc48baf3ebd6c37daf8e0be8fc73ecb.tar.gz",
)
rules_rust = use_extension("@rules_rs//rs/experimental:rules_rust.bzl", "rules_rust")
use_repo(rules_rust, "rules_rust")
toolchains = use_extension("@rules_rs//rs/experimental/toolchains:module_extension.bzl", "toolchains")
toolchains.toolchain(
edition = "2024",
version = "1.92.0",
)
use_repo(
toolchains,
"experimental_rust_toolchains_1_92_0",
"rust_toolchain_artifacts_macos_aarch64_1_92_0",
)
register_toolchains("@experimental_rust_toolchains_1_92_0//:all")
crate = use_extension("@rules_rs//rs:extensions.bzl", "crate")
crate.from_cargo(
name = "crates",
cargo_lock = "//:Cargo.lock",
cargo_toml = "//:Cargo.toml",
platform_triples = [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-unknown-linux-musl",
],
)
bazel_dep(name = "zstd", version = "1.5.7")
crate.annotation(
crate = "zstd-sys",
gen_build_script = "off",
deps = ["@zstd"],
)
inject_repo(crate, "zstd")
# starlark-rust git fork: crates live in subdirectories, so rules_rs needs
# explicit strip_prefix hints for each one.
crate.annotation(
crate = "allocative",
strip_prefix = "allocative/allocative",
)
crate.annotation(
crate = "allocative_derive",
strip_prefix = "allocative/allocative_derive",
)
crate.annotation(
crate = "cmp_any",
strip_prefix = "gazebo/cmp_any",
)
crate.annotation(
crate = "display_container",
strip_prefix = "gazebo/display_container",
)
crate.annotation(
crate = "dupe",
strip_prefix = "gazebo/dupe",
)
crate.annotation(
crate = "dupe_derive",
strip_prefix = "gazebo/dupe_derive",
)
crate.annotation(
crate = "starlark",
strip_prefix = "starlark",
)
crate.annotation(
crate = "starlark_derive",
strip_prefix = "starlark_derive",
)
crate.annotation(
crate = "starlark_lsp",
strip_prefix = "starlark_lsp",
)
crate.annotation(
crate = "starlark_map",
strip_prefix = "starlark_map",
)
crate.annotation(
crate = "starlark_syntax",
strip_prefix = "starlark_syntax",
)
crate.annotation(
crate = "strong_hash",
strip_prefix = "gazebo/strong_hash",
)
crate.annotation(
crate = "strong_hash_derive",
strip_prefix = "gazebo/strong_hash_derive",
)
use_repo(crate, "crates")
bazel_dep(name = "rules_multitool", version = "1.9.0")
multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool")
multitool.hub(lockfile = "//tools:tools.lock.json")
use_repo(multitool, "multitool")
http_archive(
name = "foo",
build_file_content = """\
filegroup(name = "test", srcs = [])
""",
urls = [
"https://github.com/bazel-contrib/rules_oci/archive/refs/heads/main.zip",
],
)
# Shellcheck binaries used by the lint task
http_archive(
name = "shellcheck_darwin_aarch64",
build_file_content = """\
genrule(
name = "shellcheck",
srcs = ["shellcheck-v0.10.0/shellcheck"],
outs = ["shellcheck_bin"],
cmd = "cp $(SRCS) $@ && chmod +x $@",
executable = True,
visibility = ["//visibility:public"],
)
""",
sha256 = "bbd2f14826328eee7679da7221f2bc3afb011f6a928b848c80c321f6046ddf81",
url = "https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellcheck-v0.10.0.darwin.aarch64.tar.xz",
)
http_archive(
name = "shellcheck_linux_x86_64",
build_file_content = """\
genrule(
name = "shellcheck",
srcs = ["shellcheck-v0.10.0/shellcheck"],
outs = ["shellcheck_bin"],
cmd = "cp $(SRCS) $@ && chmod +x $@",
executable = True,
visibility = ["//visibility:public"],
)
""",
sha256 = "6c881ab0698e4e6ea235245f22832860544f17ba386442fe7e9d629f8cbedf87",
url = "https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellcheck-v0.10.0.linux.x86_64.tar.xz",
)