forked from monogon-dev/monogon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWORKSPACE
305 lines (227 loc) · 8.12 KB
/
WORKSPACE
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
workspace(name = "dev_source_monogon")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
# Load skylib
http_archive(
name = "bazel_skylib",
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
# Assert minimum Bazel version
load("@bazel_skylib//lib:versions.bzl", "versions")
versions.check(minimum_bazel_version = "2.2.0")
# Go and Gazelle
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_go",
sha256 = "685052b498b6ddfe562ca7a97736741d87916fe536623afb7da2824c0211c369",
patch_args = ["-p1"],
patches = [
"//third_party/go/patches:rules_go_absolute_embedsrc.patch",
],
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.33.0/rules_go-v0.33.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.33.0/rules_go-v0.33.0.zip",
],
)
http_archive(
name = "bazel_gazelle",
patch_args = ["-p1"],
patches = [
"//third_party/gazelle:add-prepatching.patch",
],
sha256 = "5982e5463f171da99e3bdaeff8c0f48283a7a5f396ec5282910b9e8a49c0dd7e",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
],
)
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("//third_party/go:repositories.bzl", "go_repositories")
# gazelle:repository_macro third_party/go/repositories.bzl%go_repositories
go_repositories()
go_rules_dependencies()
go_register_toolchains(
go_version = "1.18.3",
nogo = "@dev_source_monogon//build/analysis:nogo",
)
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
# Load Gazelle-generated local dependencies
gazelle_dependencies()
# Protobuf
http_archive(
name = "com_google_protobuf",
sha256 = "c6003e1d2e7fefa78a3039f19f383b4f3a61e81be8c19356f85b6461998ad3db",
strip_prefix = "protobuf-3.17.3",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.17.3.tar.gz"],
)
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
# Build packages
http_archive(
name = "rules_pkg",
sha256 = "a89e203d3cf264e564fcb96b6e06dd70bc0557356eb48400ce4b5d97c2c3720d",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.5.1/rules_pkg-0.5.1.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.5.1/rules_pkg-0.5.1.tar.gz",
],
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
# Rust rules
http_archive(
name = "rules_rust",
sha256 = "6c6abf4100b3118467a9674e9dba5f4933aa97840f909823aacddffc2abe139b",
strip_prefix = "rules_rust-f4cbea56b8053436fbab625fc32254da212a0304",
urls = [
# Main branch as of 2021-07-01
"https://github.com/bazelbuild/rules_rust/archive/f4cbea56b8053436fbab625fc32254da212a0304.tar.gz",
],
)
load("@rules_rust//rust:repositories.bzl", "rust_repositories")
rust_repositories()
load("//third_party/rust/cargo:crates.bzl", "raze_fetch_remote_crates")
raze_fetch_remote_crates()
# third_party external repositories
load("//third_party/linux:external.bzl", "linux_external")
linux_external(
name = "linux",
version = "5.15.32",
)
load("//third_party/linux-firmware:external.bzl", "linux_firmware_external")
linux_firmware_external(
name = "linux-firmware",
version = "20211216",
)
load("//third_party/intel_ucode:external.bzl", "intel_ucode_external")
intel_ucode_external(
name = "intel_ucode",
version = "20220207",
)
load("//third_party/edk2:external.bzl", "edk2_external")
edk2_external(name = "edk2")
load("//third_party/musl:external.bzl", "musl_external")
musl_external(
name = "musl",
version = "1.1.24",
)
load("//third_party/util-linux:external.bzl", "util_linux_external")
util_linux_external(
name = "util_linux",
version = "2.36.2",
)
load("//third_party/xfsprogs:external.bzl", "xfsprogs_external")
xfsprogs_external(
name = "xfsprogs",
version = "5.10.0",
)
load("//third_party/pixman:external.bzl", "pixman_external")
pixman_external(
name = "pixman",
version = "0.40.0",
)
load("//third_party/uring:external.bzl", "uring_external")
uring_external(
name = "uring",
version = "2.0",
)
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "gperf",
commit = "de9373c2d48a3edf29862eb8be44764a7f7d24c6",
remote = "https://github.com/monogon-dev/gperf.git",
shallow_since = "1615306886 +0100",
)
load("//third_party/seccomp:external.bzl", "seccomp_external")
seccomp_external(
name = "seccomp",
version = "2.5.1",
)
load("//third_party/glib:external.bzl", "glib_external")
glib_external(
name = "glib",
version = "2.67.5",
)
load("//third_party/qemu:external.bzl", "qemu_external")
qemu_external(
name = "qemu",
version = "5.2.0",
)
load("//third_party/chrony:external.bzl", "chrony_external")
chrony_external(
name = "chrony",
)
load("//third_party/cap:external.bzl", "cap_external")
cap_external(
name = "cap",
version = "1.2.55",
)
load("//third_party/gnuefi:external.bzl", "gnuefi_external")
gnuefi_external(
name = "gnuefi",
version = "3.0.14",
)
load("//third_party/efistub:external.bzl", "efistub_external")
efistub_external(
name = "efistub",
# Developed in the systemd monorepo, pinned to master as there have been a bunch of critical fixes for the
# EFI stub since 249.
version = "3542da2442d8b29661b47c42ad7e5fa9bc8562ec",
)
register_toolchains("//:host_python")
# same for gvisor/rules_docker.
http_archive(
name = "io_bazel_rules_docker",
sha256 = "59d5b42ac315e7eadffa944e86e90c2990110a1c8075f1cd145f487e999d22b3",
strip_prefix = "rules_docker-0.17.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.17.0/rules_docker-v0.17.0.tar.gz"],
)
load(
"@io_bazel_rules_docker//repositories:repositories.bzl",
container_repositories = "repositories",
)
container_repositories()
load(
"@io_bazel_rules_docker//go:image.bzl",
go_image_repos = "repositories",
)
go_image_repos()
# Derived from Mozilla NSS, currently needed for containerd to be able to pull images
http_file(
name = "cacerts",
sha256 = "adf770dfd574a0d6026bfaa270cb6879b063957177a991d453ff1d302c02081f",
urls = ["https://curl.haxx.se/ca/cacert-2020-01-01.pem"],
)
# lz4, the library and the tool.
http_archive(
name = "com_github_lz4_lz4",
patch_args = ["-p1"],
patches = ["//third_party/lz4:build.patch"],
sha256 = "658ba6191fa44c92280d4aa2c271b0f4fbc0e34d249578dd05e50e76d0e5efcc",
strip_prefix = "lz4-1.9.2",
urls = ["https://github.com/lz4/lz4/archive/v1.9.2.tar.gz"],
)
# ini.h, a tiny ini parser library
http_archive(
name = "inih",
build_file = "@//third_party/inih:inih.bzl",
sha256 = "01b0366fdfdf6363efc070c2f856f1afa33e7a6546548bada5456ad94a516241",
strip_prefix = "inih-r53",
urls = ["https://github.com/benhoyt/inih/archive/r53.tar.gz"],
)
# qboot bootloader for MicroVMs
http_archive(
name = "com_github_bonzini_qboot",
build_file = "//third_party/qboot:qboot.bzl",
sha256 = "a643b2486fbee57b969659d408984094ca9afa1a048317dd3f5d3022e47213e8",
strip_prefix = "qboot-a5300c4949b8d4de2d34bedfaed66793f48ec948",
urls = ["https://github.com/bonzini/qboot/archive/a5300c4949b8d4de2d34bedfaed66793f48ec948.tar.gz"],
)
# Load musl toolchain Metropolis sysroot tarball into external repository.
load("//build/toolchain/musl-host-gcc:sysroot.bzl", "musl_sysroot_repositories")
musl_sysroot_repositories()