• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14"""Fetches workspace dependencies required for //pw_protobuf"""
15
16load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
17
18def pw_protobuf_dependencies():
19    """ Fetches workspace dependencies required for //pw_protobuf """
20    if "com_google_protobuf" not in native.existing_rules():
21        http_archive(
22            name = "com_google_protobuf",
23            sha256 = "71030a04aedf9f612d2991c1c552317038c3c5a2b578ac4745267a45e7037c29",
24            strip_prefix = "protobuf-3.12.3",
25            url = "https://github.com/protocolbuffers/protobuf/archive/v3.12.3.tar.gz",
26        )
27    if "rules_proto_grpc" not in native.existing_rules():
28        http_archive(
29            name = "rules_proto_grpc",
30            sha256 = "5f0f2fc0199810c65a2de148a52ba0aff14d631d4e8202f41aff6a9d590a471b",
31            strip_prefix = "rules_proto_grpc-1.0.2",
32            urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/1.0.2.tar.gz"],
33        )
34