-
Notifications
You must be signed in to change notification settings - Fork 17
/
WORKSPACE
211 lines (176 loc) · 5.38 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
# Copyright 2021 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.
workspace(name = "com_google_maldoca")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_jar")
# We use maybe to avoid multiple loads of the same repo.
# If the repo is already loaded, "maybe" has no effect
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
# Rules Python; This package has to be loaded in the beginning, otherwise other
# packages load an outdated version.
maybe(
http_archive,
name = "rules_python",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.3.0/rules_python-0.3.0.tar.gz",
sha256 = "934c9ceb552e84577b0faf1e5a2f0450314985b4d8712b2b70717dc679fdc01b",
)
# Protobuf
maybe(
local_repository,
name = "com_google_protobuf",
path = "./third_party/protobuf",
)
# C++ rules for Bazel.
maybe(
local_repository,
name = "rules_cc",
path = "./third_party/rules_cc",
)
# Protobuf rules for Bazel.
maybe(
local_repository,
name = "rules_proto",
path = "./third_party/rules_proto",
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
# Build pkg
http_archive(
name = "rules_pkg",
sha256 = "aeca78988341a2ee1ba097641056d168320ecc51372ef7ff8e64b139516a4937",
urls = [
"https://github.com/bazelbuild/rules_pkg/releases/download/0.2.6-1/rules_pkg-0.2.6.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.2.6/rules_pkg-0.2.6.tar.gz",
],
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
# Abseil C++
maybe(
local_repository,
name = "com_google_absl",
path = "./third_party/abseil-cpp",
)
# Google Test
maybe(
local_repository,
name = "com_google_googletest",
path = "./third_party/googletest",
)
# Google RE2 (Regular Expression) C++ Library
maybe(
local_repository,
name = "com_googlesource_code_re2",
path = "./third_party/re2",
)
# Benchmark
maybe(
local_repository,
name = "com_google_benchmark",
path = "./third_party/benchmark",
)
# tensorflow - We only care about example.proto and feature.proto
maybe(
new_local_repository,
name = "tensorflow_protos",
build_file = "@//:bazel/tensorflow_protos.BUILD",
path = "./third_party/tensorflow_protos",
)
# ZetaSQL - We only care about //zetasql/base/...
maybe(
new_local_repository,
name = "com_google_zetasql",
build_file = "@//:bazel/zetasql.BUILD",
path = "third_party/zetasql",
)
# Zlib
maybe(
new_local_repository,
name = "zlib",
build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
path = "./third_party/zlib",
)
# Zlib's minizip
maybe(
new_local_repository,
name = "minizip",
build_file = "@//:bazel/minizip.BUILD",
path = "./third_party/zlib",
)
# zip_reader from zlib in Chromium's third party directory.
maybe(
new_local_repository,
name = "zip_reader",
build_file = "@//:bazel/zip_reader.BUILD",
path = "./third_party/chromium",
)
# Zlibwrapper
maybe(
new_local_repository,
name = "zlibwrapper",
build_file = "@//:bazel/zlibwrapper.BUILD",
path = "./third_party/zlibwrapper",
)
# Libxml
maybe(
new_local_repository,
name = "libxml",
build_file = "@//:bazel/libxml.BUILD",
path = "./third_party/libxml2",
)
# Libxml configs
maybe(
new_local_repository,
name = "libxml_config",
build_file = "@//:third_party/libxml2_config/BUILD.bazel",
path = "./third_party/libxml2_config",
)
# BoringSSL
maybe(
local_repository,
name = "boringssl",
path = "./third_party/boringssl",
)
# build_bazel_rules_apple seems required for gRPC with bazel >= 5.0.0.
# More context: https://github.com/bazelbuild/bazel/issues/13811
http_archive(
name = "build_bazel_rules_apple",
sha256 = "0052d452af7742c8f3a4e0929763388a66403de363775db7e90adecb2ba4944b",
urls = [
"https://github.com/bazelbuild/rules_apple/releases/download/0.31.3/rules_apple.0.31.3.tar.gz",
],
)
# gRPC. Note it needs to be named com_github_grpc_grpc because it's referred
# as such internally.
local_repository(
name = "com_github_grpc_grpc",
path = "./third_party/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()
# Need to separately setup Protobuf dependencies in order for the build rules
# to work.
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
# Mini Chromium
maybe(
new_local_repository,
name = "mini_chromium",
build_file = "@//:bazel/mini_chromium.BUILD",
path = "./third_party/mini_chromium",
)