-
Notifications
You must be signed in to change notification settings - Fork 10
/
deps.bzl
41 lines (36 loc) · 1.53 KB
/
deps.bzl
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
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def _maybe(repo_rule, name, **kwargs):
"""Executes the given repository rule if it hasn't been executed already.
Args:
repo_rule: The repository rule to be executed (e.g., `http_archive`.)
name: The name of the repository to be defined by the rule.
**kwargs: Additional arguments passed directly to the repository rule.
"""
if not native.existing_rule(name):
repo_rule(name = name, **kwargs)
def dflat_deps():
"""Loads common dependencies needed to compile the dflat library."""
_maybe(
new_git_repository,
name = "flatbuffers",
remote = "https://github.com/google/flatbuffers.git",
commit = "c92e78a9f841a6110ec27180d68d1f7f2afda21d",
shallow_since = "1664514727 -0700",
build_file = "@dflat//:external/flatbuffers.BUILD",
)
_maybe(
new_git_repository,
name = "swift-atomics",
remote = "https://github.com/apple/swift-atomics.git",
commit = "088df27f0683f2b458021ebf04873174b91ae597",
shallow_since = "1649274362 -0700",
build_file = "@dflat//:external/swift-atomics.BUILD",
)
_maybe(
http_archive,
name = "sqlite3",
sha256 = "87775784f8b22d0d0f1d7811870d39feaa7896319c7c20b849a4181c5a50609b",
urls = ["https://www.sqlite.org/2022/sqlite-amalgamation-3390200.zip"],
build_file = "@dflat//:external/sqlite3.BUILD",
)