-
Notifications
You must be signed in to change notification settings - Fork 7
/
MODULE.bazel
146 lines (129 loc) · 6.1 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
# Copyright 2023, 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Bzlmod module definition for rules_elisp."""
module(
name = "phst_rules_elisp",
bazel_compatibility = [">=6.4.0"],
)
# Non-development module dependencies
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "bazel_features", version = "1.20.0")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_cc", version = "0.1.0")
bazel_dep(name = "rules_python", version = "0.37.1")
bazel_dep(name = "abseil-cpp", version = "20240116.2", repo_name = "com_google_absl")
bazel_dep(name = "protobuf", version = "28.3", repo_name = "com_google_protobuf")
# Development-only module dependencies
bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc")
bazel_dep(name = "rules_go", version = "0.50.1", dev_dependency = True, repo_name = "io_bazel_rules_go")
bazel_dep(name = "abseil-py", version = "1.4.0", dev_dependency = True, repo_name = "io_abseil_py")
bazel_dep(name = "gazelle", version = "0.39.1", dev_dependency = True, repo_name = "bazel_gazelle")
# Bring in the local_config_cc repository. It’s needed for
# //emacs:windows_cc_toolchain.
cc_configure = use_extension("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_configure_extension")
use_repo(cc_configure, "local_config_cc")
# Non-module dependencies
deps = use_extension("//private:extensions.bzl", "deps")
use_repo(deps, "local_emacs")
use_repo(deps, "gnu_emacs_28.2")
use_repo(deps, "gnu_emacs_29.4")
use_repo(deps, "gnu_emacs_windows_28.2")
use_repo(deps, "gnu_emacs_windows_29.4")
dev_deps = use_extension("//private:extensions.bzl", "dev_deps", dev_dependency = True)
use_repo(dev_deps, "phst_rules_elisp_dev_deps")
# Local toolchains
register_toolchains("@phst_rules_elisp//elisp:hermetic_toolchain")
# Python-specific dependencies
python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency = True)
python.toolchain(
configure_coverage_tool = True,
# Attempt to work around nondeterminism on Windows. See
# https://github.com/bazelbuild/rules_python/pull/713 and
# https://github.com/bazelbuild/rules_python/pull/907.
ignore_root_user_error = True,
python_version = "3.10",
)
use_repo(python, hermetic_python = "python_3_10")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency = True)
pip.parse(
hub_name = "pip",
python_version = "3.10",
requirements_darwin = "//dev:macos-requirements.txt",
requirements_linux = "//dev:linux-requirements.txt",
requirements_windows = "//dev:windows-requirements.txt",
)
use_repo(pip, pip_deps = "pip")
# Go-specific dependencies
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk", dev_dependency = True)
go_sdk.nogo(nogo = "//dev:nogo")
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps", dev_dependency = True)
go_deps.module(
path = "github.com/bazelbuild/buildtools",
sum = "h1:FGzENZi+SX9I7h9xvMtRA3rel8hCEfyzSixteBgn7MU=",
version = "v0.0.0-20240918101019-be1c24cc9a44",
)
go_deps.module(
path = "github.com/google/addlicense",
sum = "h1:jpVf9qPbU8rz5MxKo7d+RMcNHkqxi4YJi/laauX4aAE=",
version = "v1.1.1",
)
go_deps.module(
path = "github.com/google/go-cmp",
sum = "h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=",
version = "v0.6.0",
)
use_repo(
go_deps,
"com_github_bazelbuild_buildtools",
"com_github_google_addlicense",
"com_github_google_go_cmp",
)
# Tools for development
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
archive_override(
module_name = "hedron_compile_commands",
integrity = "sha384-esPTYvOAWfvydCLlfTFTItuRKaDDLV/qJ+3BRqlh6pGhvhOmJtqKZ8OeyJ7iuSUy",
strip_prefix = "bazel-compile-commands-extractor-eca42c63700fccdc49cf58177e0a96f0f6075a68",
urls = ["https://github.com/hedronvision/bazel-compile-commands-extractor/archive/eca42c63700fccdc49cf58177e0a96f0f6075a68.zip"],
)
bazel_dep(name = "phst_update_workspace_snippets", dev_dependency = True)
archive_override(
module_name = "phst_update_workspace_snippets",
integrity = "sha384-hARfrBeNuJMLiv/SMWGIZci4JM+9wZu/h1rCYmVqfGVeWh65vvLqdyvCIDvz82kB",
strip_prefix = "update-workspace-snippets-fba2b14f5a8280f65a313b9037ccecb60e33f238",
urls = ["https://github.com/phst/update-workspace-snippets/archive/fba2b14f5a8280f65a313b9037ccecb60e33f238.zip"],
)
bazel_dep(name = "phst_bazelcov", dev_dependency = True)
archive_override(
module_name = "phst_bazelcov",
integrity = "sha384-9W8IIOl1LVX9JbpK6MY4Uu2mf62i+hrmghW4hmCtLO8ABYqPTcQf8Oo0t4VUnznK",
strip_prefix = "bazelcov-012a9b2b7211b37e886403ba284b1b09e6665e89",
urls = ["https://github.com/phst/bazelcov/archive/012a9b2b7211b37e886403ba284b1b09e6665e89.zip"],
)
bazel_dep(name = "phst_merge_bazel_lockfiles", dev_dependency = True)
archive_override(
module_name = "phst_merge_bazel_lockfiles",
integrity = "sha384-gFuWEcT8E1bI6t3DVCcdr3wPUQ2IZOY9ND472JvDb55pZhLKJd9j6bvjDubP7svW",
strip_prefix = "merge-bazel-lockfiles-95005999479dcac5d6a3399a9f58625e078db448",
urls = ["https://github.com/phst/merge-bazel-lockfiles/archive/95005999479dcac5d6a3399a9f58625e078db448.zip"],
)
# We want to test the external example without adding its repository to the
# registry. So we override the dependency immediately locally.
bazel_dep(name = "phst_rules_elisp_example", dev_dependency = True, repo_name = "example")
local_path_override(
module_name = "phst_rules_elisp_example",
path = "examples/ext",
)