forked from bazel-contrib/rules_img
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMODULE.bazel
More file actions
132 lines (113 loc) · 4.75 KB
/
Copy pathMODULE.bazel
File metadata and controls
132 lines (113 loc) · 4.75 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
module(
name = "rules_img",
version = "0.3.3",
compatibility_level = 1,
)
bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "hermetic_launcher", version = "0.0.3")
prebuilt_img_tool = use_extension("@rules_img//img/private/prebuilt:prebuilt.bzl", "prebuilt_img_tool")
prebuilt_img_tool.collection(
name = "img_toolchain",
)
prebuilt_img_tool.from_file(
collection = "img_toolchain",
file = "@rules_img//:prebuilt_lockfile.json",
)
use_repo(
prebuilt_img_tool,
"img_toolchain",
)
# register a prebuilt toolchain of the img tool.
register_toolchains(
"@img_toolchain//:all",
)
pull_tool = use_extension("@rules_img//img/private/prebuilt:prebuilt.bzl", "pull_tool")
pull_tool.collection(name = "pull_hub_repo")
pull_tool.from_file(
collection = "pull_hub_repo",
file = "@rules_img//:pull_tool_lockfile.json",
)
use_repo(
pull_tool,
"pull_hub_repo",
)
### REMOVE_BEFORE_RELEASE_START
# ✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂
# only dev_dependencies below this line - rules_img is lean
# ✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂
# toolchains_protoc needs to be placed at the top to ensure the proto toolchain is registered first
bazel_dep(name = "toolchains_protoc", version = "0.6.0", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.22.0", dev_dependency = True) # only exists to upgrade bazel_lib used by cgrindel_bazel_starlib to a version compatible with Bazel 9
bazel_dep(name = "bazel_lib", version = "3.0.0", dev_dependency = True)
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.8.2", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.2.1", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.47.0", dev_dependency = True)
bazel_dep(name = "hermetic_cc_toolchain", version = "4.0.1", dev_dependency = True)
bazel_dep(name = "rules_bazel_integration_test", version = "0.34.0", dev_dependency = True)
bazel_dep(name = "rules_go", version = "0.59.0", dev_dependency = True)
bazel_dep(name = "rules_img_pull_tool", version = "0.3.3", dev_dependency = True)
bazel_dep(name = "rules_img_tool", version = "0.3.3", dev_dependency = True)
bazel_dep(name = "rules_pkg", version = "1.1.0", dev_dependency = True)
bazel_dep(name = "rules_python", version = "1.7.0", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.8.0", dev_dependency = True)
# Register a source-built toolchain of the img tool
# for use in this repository (in dev mode).
register_toolchains(
"@rules_img_tool//toolchain:all",
dev_dependency = True,
)
module_version = use_extension("//img/private/config:defs.bzl", "module_version", dev_dependency = True)
use_repo(module_version, "rules_img_version")
bazel_binaries = use_extension(
"@rules_bazel_integration_test//:extensions.bzl",
"bazel_binaries",
dev_dependency = True,
)
bazel_binaries.download(version = "7.4.0")
bazel_binaries.download(version = "8.4.2")
bazel_binaries.download(version = "9.0.0rc3")
use_repo(bazel_binaries, "bazel_binaries", "bazel_binaries_bazelisk", "build_bazel_bazel_7_4_0", "build_bazel_bazel_8_4_2", "build_bazel_bazel_9_0_0rc3")
go_sdk = use_extension(
"@rules_go//go:extensions.bzl",
"go_sdk",
dev_dependency = True,
)
go_sdk.download(version = "1.25.4")
go_sdk.nogo(
includes = [
"@rules_img//:__subpackages__",
"@rules_img_pull_tool//:__subpackages__",
"@rules_img_tool//:__subpackages__",
],
nogo = "//util:nogo",
)
toolchains = use_extension("@hermetic_cc_toolchain//toolchain:ext.bzl", "toolchains", dev_dependency = True)
use_repo(toolchains, "zig_sdk")
register_toolchains(
"@zig_sdk//toolchain:linux_amd64_gnu.2.17",
"@zig_sdk//toolchain:linux_arm64_gnu.2.17",
dev_dependency = True,
)
protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc", dev_dependency = True)
protoc.toolchain(version = "v33.0")
http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
http_file(
name = "large_file_1GB",
dev_dependency = True,
integrity = "sha256-n9ndX1LfKXTrcnPBT8Kqa85x87TcH3BOaHWoeuJ+kKA=",
urls = ["https://ash-speed.hetzner.com/1GB.bin"],
)
http_file(
name = "large_file_10GB",
dev_dependency = True,
integrity = "sha256-Vc5IJJOis3bBooauVUOr77JwiZLHC3lA9dbAjMZvNFw=",
urls = ["https://ash-speed.hetzner.com/10GB.bin"],
)
single_version_override(
module_name = "protobuf",
patch_strip = 1,
patches = ["//:0001-protobuf-19679-rm-protoc-dep.patch"],
version = "33.0",
)
### REMOVE_BEFORE_RELEASE_END