-
Notifications
You must be signed in to change notification settings - Fork 3
/
MODULE.bazel
174 lines (145 loc) · 5.53 KB
/
MODULE.bazel
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
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################
bazel_dep(name = "rules_oci", version = "2.2.0")
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# Declare external images you need to pull, for example:
oci.pull(
name = "distroless_base",
digest = "sha256:280852156756ea3f39f9e774a30346f2e756244e1f432aea3061c4ac85d90a66",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
"linux/arm64/v8",
"linux/arm/v7",
"linux/s390x",
"linux/ppc64le",
],
)
# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(
oci,
"distroless_base",
"distroless_base_linux_amd64",
"distroless_base_linux_arm64_v8",
"distroless_base_linux_arm_v7",
"distroless_base_linux_ppc64le",
"distroless_base_linux_s390x",
)
bazel_dep(name = "aspect_bazel_lib", version = "2.10.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.7.1", dev_dependency = True)
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_python", version = "1.0.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
# renovate:
# datasource=python-version
# versioning=python
# depName=python
PYTHON_VERSION = "3.13"
python.toolchain(
is_default = True,
python_version = PYTHON_VERSION,
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pip",
python_version = PYTHON_VERSION,
requirements_lock = "//:requirements.txt",
)
use_repo(pip, "pip")
bazel_dep(name = "aspect_rules_swc", version = "2.2.0")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "aspect_rules_js", version = "2.1.2")
####### Node.js version #########
# By default you get the node version from DEFAULT_NODE_VERSION in @rules_nodejs//nodejs:repositories.bzl
# Optionally you can pin a different node version:
bazel_dep(name = "rules_nodejs", version = "6.3.2")
#node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
#node.toolchain(node_version = "18.13.0")
#################################
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm", dev_dependency = True)
use_repo(pnpm, "pnpm")
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True)
npm.npm_translate_lock(
name = "npm",
npmrc = "@@//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm")
bazel_dep(name = "aspect_rules_ts", version = "3.1.0")
rules_ts_ext = use_extension(
"@aspect_rules_ts//ts:extensions.bzl",
"ext",
dev_dependency = True,
)
rules_ts_ext.deps(
ts_version_from = "//:package.json",
)
use_repo(rules_ts_ext, "npm_typescript")
bazel_dep(name = "aspect_rules_lint", version = "0.21.0")
bazel_dep(name = "bazel_features", version = "1.23.0")
bazel_dep(name = "rules_go", version = "0.51.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.40.0", repo_name = "bazel_gazelle")
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.22.7")
use_repo(
go_sdk,
"go_toolchains",
)
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
# regenerate with bazelisk mod tidy
use_repo(
go_deps,
"co_honnef_go_tools",
"com_github_bazelbuild_bazel_watcher",
"com_github_bazelbuild_buildtools",
"com_github_go_delve_delve",
"com_github_golang_protobuf",
"com_github_google_go_containerregistry",
"com_github_gorilla_websocket",
"com_github_hashicorp_terraform_plugin_framework",
"com_github_itchyny_gojq",
"com_github_oapi_codegen_oapi_codegen_v2",
"com_github_oapi_codegen_runtime",
"com_github_sergi_go_diff",
"com_github_tdewolff_parse_v2",
"com_github_twilio_twilio_go",
"com_github_xeipuuv_gojsonschema",
"org_golang_x_sync",
"org_golang_x_tools",
)
bazel_dep(name = "rules_python_gazelle_plugin", version = "1.0.0")
bazel_dep(name = "aspect_rules_py", version = "1.0.0")
go_deps_with_disabled_proto_generation = [
"github.com/hashicorp/go-plugin",
]
[
go_deps.gazelle_override(
directives = [
"gazelle:go_generate_proto false",
],
path = path,
)
for path in go_deps_with_disabled_proto_generation
]
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "com_github_openai_openai_openapi",
build_file_content = """exports_files(glob(["**/*"]))""",
integrity = "sha256-P0PkXK8DEh56Z+S7dWMwxIpVxqmuDJTBuni5ZN/cSok=",
strip_prefix = "openai-openapi-2577b8c9a889a61c1163075c2e71e3812d80aa83",
url = "https://github.com/openai/openai-openapi/archive/2577b8c9a889a61c1163075c2e71e3812d80aa83.zip",
)
http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
http_file(
name = "org_iana_data_zone1970_tab",
integrity = "sha256-3ANHICItrC0iU1vSQAMKZXN1a68sozBiy9AHi9ZGooE=",
url = "https://data.iana.org/time-zones/tzdb/zone1970.tab",
)