forked from Checkmk/checkmk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MODULE.bazel
67 lines (53 loc) · 2.27 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
repo_license = use_repo_rule("//omd/packages/rules:repo_license.bzl", "detect_repo_license")
repo_license(name = "repo_license")
# Hedron's Compile Commands Extractor for Bazel
# https://github.com/hedronvision/bazel-compile-commands-extractor
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
# No tags, no releases. Let's go with today's head.
commit = "1e08f8e0507b6b6b1f4416a9a22cf5c28beaba93",
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
)
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_rust", version = "0.49.3")
bazel_dep(name = "rules_python", version = "0.37.0")
# TODO: how to sync this with the PYTHON_VERSION in package_versions.bzl?
PYTHON_VERSION = "3.12.3"
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
# We can specify the exact version.
python_version = PYTHON_VERSION,
)
bazel_dep(name = "aspect_rules_py", version = "0.7.4")
bazel_dep(name = "aspect_rules_lint", version = "1.0.2")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
environment = {
# Hack for building extensions from source.
# See also: https://github.com/bazelbuild/rules_python/issues/1463
"CC": "gcc-13",
},
hub_name = "cmk_requirements",
python_version = PYTHON_VERSION,
requirements_by_platform = {
"@//:requirements_lock.txt": "linux_*",
},
)
use_repo(pip, "cmk_requirements")
# Keep in synch with Pipfile---will work automatically when we drop pipenv
bazel_dep(name = "protobuf", version = "24.4", repo_name = "com_google_protobuf")
fork_cc_toolchain_config = use_repo_rule("//omd/packages/toolchain:fork_cc_toolchain_config.bzl", "fork_cc_toolchain_config")
fork_cc_toolchain_config(
name = "forked_cc_toolchain_config",
)
register_toolchains("//omd/packages/toolchain:linux_gcc13")
# bazel_skylib: Required for setting up rules_foreign_cc
bazel_dep(name = "bazel_skylib", version = "1.6.1")
single_version_override(
module_name = "rules_foreign_cc",
patch_strip = 1,
patches = ["//omd/packages/foreign_cc:symlink.patch"],
)
bazel_dep(name = "rules_foreign_cc", version = "0.11.1")