-
Notifications
You must be signed in to change notification settings - Fork 12
/
WORKSPACE
261 lines (198 loc) · 9.1 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
# Bazel (http://bazel.io/) workspace file for MozoLM server.
workspace(name = "com_google_mozolm")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# ------------------------------------
# Bazel rules:
# ------------------------------------
# See https://github.com/bazelbuild/rules_python.
#
# This entry is a bit of a kludge. It makes sure that whichever repos that
# import `rules_python` import the latest official release. Without it, it
# seems to be impossible to import `io_bazel_rules_docker` below successfully.
http_archive(
name = "rules_python",
sha256 = "5868e73107a8e85d8f323806e60cad7283f34b32163ea6ff1020cf27abef6036",
strip_prefix = "rules_python-0.25.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.25.0/rules_python-0.25.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
# ----------------------------------------------
# Nisaba: Script processing library from Google:
# ----------------------------------------------
# We depend on some of core C++ libraries from Nisaba and use the fresh code
# from the HEAD. See
# https://github.com/google-research/nisaba
nisaba_version = "main"
http_archive(
name = "com_google_nisaba",
url = "https://github.com/google-research/nisaba/archive/refs/heads/%s.zip" % nisaba_version,
strip_prefix = "nisaba-%s" % nisaba_version,
)
load("@com_google_nisaba//bazel:workspace.bzl", "nisaba_public_repositories")
nisaba_public_repositories()
# ------------------------------------
# gRPC (C++) package for Bazel:
# ------------------------------------
# See https://github.com/grpc/grpc/blob/master/src/cpp/README.md#make
grpc_version = "1.53.0"
http_archive(
name = "com_github_grpc_grpc",
urls = ["https://github.com/grpc/grpc/archive/v%s.tar.gz" % grpc_version],
sha256 = "9717ffc52120861136e478155c2ff3a9c21740e2244de52fa966f376d7471adf",
strip_prefix = "grpc-%s" % grpc_version,
)
# --------------------------------------------------------
# External Java rules and Maven (required for gRPC Java):
# --------------------------------------------------------
# See https://github.com/bazelbuild/rules_jvm_external
rules_jvm_version = "4.5"
http_archive(
name = "rules_jvm_external",
url = "https://github.com/bazelbuild/rules_jvm_external/archive/refs/tags/%s.tar.gz" % rules_jvm_version,
strip_prefix = "rules_jvm_external-%s" % rules_jvm_version,
sha256 = "6e9f2b94ecb6aa7e7ec4a0fbf882b226ff5257581163e88bf70ae521555ad271",
)
load("@rules_jvm_external//:defs.bzl", "maven_install")
# ------------------------------------
# gRPC (Java) package for Bazel:
# ------------------------------------
# See https://github.com/grpc/grpc-java
java_grpc_version = "1.55.1"
http_archive(
name = "com_github_grpc_grpc_java",
url = "https://github.com/grpc/grpc-java/archive/refs/tags/v%s.tar.gz" % java_grpc_version,
sha256 = "be779db38a72a0c693706c433133189538b04979eba1b728eaa21f4fd0f967d8",
strip_prefix = "grpc-java-%s" % java_grpc_version,
)
# ------------------------------------
# gRPC dependencies:
# ------------------------------------
# Check the list of third-party dependencies accessible through gRPC here:
#
# https://github.com/grpc/grpc/tree/master/third_party
#
# Please do not specify these dependencies separately as they are likely to
# clash with the versions provided by gRPC.
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
# Not mentioned in official docs. Mentioned here: https://github.com/grpc/grpc/issues/20511
load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
grpc_extra_deps()
# -------------------------------------------------------------------------
# OpenFst: See
# http://www.openfst.org/twiki/pub/FST/FstDownload/README
# -------------------------------------------------------------------------
openfst_version = "1.8.2-rc2-absl"
http_archive(
name = "org_openfst",
urls = ["https://github.com/agutkin/finite_state/raw/main/openfst-%s.tar.gz" % openfst_version],
sha256 = "cc628823c8de813b0b216bd27d92e21f015960a111a21b09a518d73dc8aa00d8",
strip_prefix = "openfst-%s" % openfst_version,
)
# -------------------------------------------------------------------------
# Protocol buffer matches (should be part of gmock and gtest, but not yet):
# https://github.com/inazarenko/protobuf-matchers
# -------------------------------------------------------------------------
# TODO: Get rid of `protobuf-matchers` once the maintainer of gtest
# and gmock introduce it in their repos. See the discussion here:
# https://github.com/google/googletest/issues/1761
http_archive(
name = "com_github_protobuf_matchers",
urls = ["https://github.com/inazarenko/protobuf-matchers/archive/refs/heads/master.zip"],
strip_prefix = "protobuf-matchers-master",
)
# -------------------------------------------------------------------------
# Android cross-compile configuration:
# https://github.com/tensorflow/tensorflow/tree/master/third_party/android
# -------------------------------------------------------------------------
load("//extra/android:android_configure.bzl", "android_configure")
android_configure(name = "local_config_android")
load("@local_config_android//:android.bzl", "android_workspace")
android_workspace()
# ------------------------------------------------------------------------------
# Java version of gRPC: Miscellaneous required dependencies for supporting
# the `java_grpc_libray` rule. See:
# https://github.com/grpc/grpc-java/blob/master/examples/WORKSPACE
# ------------------------------------------------------------------------------
load("@com_github_grpc_grpc_java//:repositories.bzl",
"IO_GRPC_GRPC_JAVA_ARTIFACTS",
"IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS",
"grpc_java_repositories")
maven_install(
artifacts = IO_GRPC_GRPC_JAVA_ARTIFACTS,
generate_compat_repositories = True,
override_targets = IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS,
repositories = ["https://repo.maven.apache.org/maven2/"],
)
load("@maven//:compat.bzl", "compat_repositories")
compat_repositories()
grpc_java_repositories()
# ------------------------------------
# Pure JavaScript for Bazel & gRPC:
# ------------------------------------
# See:
# https://github.com/rules-proto-grpc/rules_proto_grpc
# https://rules-proto-grpc.aliddell.com/en/latest/lang/js.html
#
# See the example:
# https://github.com/rules-proto-grpc/rules_proto_grpc/blob/master/example/js/js_grpc_node_library/WORKSPACE
proto_grpc_version = "4.2.0"
http_archive(
name = "rules_proto_grpc",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/refs/tags/%s.tar.gz" % (
proto_grpc_version)],
strip_prefix = "rules_proto_grpc-%s" % proto_grpc_version,
sha256 = "bbe4db93499f5c9414926e46f9e35016999a4e9f6e3522482d3760dc61011070",
)
load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_repos", "rules_proto_grpc_toolchains")
rules_proto_grpc_toolchains()
rules_proto_grpc_repos()
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
load("@rules_proto_grpc//js:repositories.bzl", rules_proto_grpc_js_repos = "js_repos")
rules_proto_grpc_js_repos()
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
build_bazel_rules_nodejs_dependencies()
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
yarn_install(
name = "npm",
# This should be changed to your local package.json which should contain the
# dependencies required.
package_json = "@rules_proto_grpc//js:requirements/package.json",
yarn_lock = "@rules_proto_grpc//js:requirements/yarn.lock",
)
# -------------------------------------------------------------------------
# Bazel container image rules:
# https://github.com/bazelbuild/rules_docker
# -------------------------------------------------------------------------
# TODO: the `rules_docker` project has now been archived and
# it is highly likely that the docker-related tools under `release` will not
# compile or work anymore.
docker_version = "0.25.0"
http_archive(
name = "io_bazel_rules_docker",
sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v%s/rules_docker-v%s.tar.gz" % (
docker_version, docker_version)
],
)
load("@io_bazel_rules_docker//repositories:repositories.bzl", container_repositories = "repositories")
container_repositories()
load("@io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps")
container_deps()
load("@io_bazel_rules_docker//container:pull.bzl", "container_pull")
# Pull the base Linux distribution: Should be between five and six megabytes.
container_pull(
name = "alpine_linux_amd64",
registry = "index.docker.io",
repository = "library/alpine",
tag = "3.13.5",
digest = "sha256:def822f9851ca422481ec6fee59a9966f12b351c62ccb9aca841526ffaa9f748",
)
load("@io_bazel_rules_docker//cc:image.bzl", _cc_image_repos = "repositories")
_cc_image_repos()
# Local Variables:
# mode: bazel-build
# End: