-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE.bazel
128 lines (99 loc) · 4.71 KB
/
WORKSPACE.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
# WORKSPACE file
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Protobuf rules
http_archive(
name = "rules_proto",
sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208",
strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
"https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
],
)
# Protobuf
http_archive(
name = "com_google_protobuf",
sha256 = "d0f5f605d0d656007ce6c8b5a82df3037e1d8fe8b121ed42e536f569dec16113",
strip_prefix = "protobuf-3.14.0",
urls = [
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.14.0.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v3.14.0.tar.gz",
],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
# # Or, example using git_repository
# git_repository(
# name = "influxdb_cpp_client",
# remote = "https://github.com/offa/influxdb-cxx.git",
# tag = "v0.7.2", # Use the commit or tag you need
# )
# load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_foreign_cc",
sha256 = "476303bd0f1b04cc311fc258f1708a5f6ef82d3091e53fd1977fa20383425a6a",
strip_prefix = "rules_foreign_cc-0.10.1",
url = "https://github.com/bazelbuild/rules_foreign_cc/releases/download/0.10.1/rules_foreign_cc-0.10.1.tar.gz",
)
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
# This sets up some common toolchains for building targets. For more details, please see
# https://bazelbuild.github.io/rules_foreign_cc/0.10.1/flatten.html#rules_foreign_cc_dependencies
rules_foreign_cc_dependencies()
http_archive(
name = "libinflux_cxx",
build_file="//bazel/external:libinflux_cxx.BUILD",
strip_prefix = "influxdb-cxx-0.7.2",
url = "https://github.com/offa/influxdb-cxx/archive/refs/tags/v0.7.2.tar.gz",
# tag = "v0.7.2"
)
# rules_foreign_cc setup (assuming you've already added it)
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
rules_foreign_cc_dependencies()
http_archive(
name = "nanopb",
urls = ["https://github.com/nanopb/nanopb/archive/refs/tags/0.4.5.tar.gz"], # Example URL, replace with actual
# sha256 = "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", # Example SHA-256, replace with actual
strip_prefix = "nanopb-0.4.5", # Adjust based on the archive structure
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# http_archive(
# name = "rules_python",
# sha256 = "c68bdc4fbec25de5b5493b8819cfc877c4ea299c0dcb15c244c5a00208cde311",
# strip_prefix = "rules_python-0.31.0",
# url = "https://github.com/bazelbuild/rules_python/releases/download/0.31.0/rules_python-0.31.0.tar.gz",
# )
# load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
# py_repositories()
# load()
# load(":python_toolchain.bzl", "python_toolchain")
# python_toolchain(
# name = "my_python_toolchain",
# python_interpreter_path = "/home/shihao/Code/vvtol/venv/bin/python", # Adjust this path as necessary
# )
# load("@rules_python//python:repositories.bzl", "python_register_toolchains")
# python_register_toolchains(
# name = "python_3_8",
# # Available versions are listed in @rules_python//python:versions.bzl.
# # We recommend using the same version your team is already standardized on.
# python_version = "3.8",
# )
# load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# git_repository(
# name = "platformio_rules",
# remote = "http://github.com/mum4k/platformio_rules.git",
# tag = "v0.0.14",
# )
# load("@platformio_rules//bazel:deps.bzl", "platformio_rules_dependencies")
# platformio_rules_dependencies()
# load("@platformio_rules//bazel:transitive.bzl", "platformio_rules_transitive_dependencies")
# platformio_rules_transitive_dependencies()
# load("@platformio_rules//bazel:pip_parse.bzl", "platformio_rules_pip_parse_dependencies")
# platformio_rules_pip_parse_dependencies()
# load("@platformio_rules//bazel:pip_install.bzl", "platformio_rules_pip_install_dependencies")
# platformio_rules_pip_install_dependencies()