# Copyright 2018 The Bazel Authors. All rights reserved.
#
# 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
#
#    http://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.

load("//proto/raze:crates.bzl", _crate_deps = "raze_fetch_remote_crates")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

def rust_proto_repositories():
    """Declare dependencies needed for proto compilation."""
    if not native.existing_rule("com_google_protobuf"):
        git_repository(
            name = "com_google_protobuf",
            remote = "https://github.com/protocolbuffers/protobuf.git",
            commit = "7b28271a61a3da0a37f6fda399b0c4c86464e5b3",  # 2018-11-16
        )

    _crate_deps()

    # Register toolchains
    native.register_toolchains(
        "@io_bazel_rules_rust//proto:default-proto-toolchain",
    )

@@ -716,19 +716,20 @@
 epo:
-git
+http
 .bzl%22, %22
 git_
@@ -724,30 +724,28 @@
 .bzl%22, %22
-git_repository
+http_archive
 %22)%0A%0Adef 
@@ -900,22 +900,20 @@
     
-git_repository
+http_archive
 (%0A  
@@ -968,17 +968,97 @@
     
-remote
+# commit 7b28271a61a3da0a37f6fda399b0c4c86464e5b3 is from 2018-11-16%0A            urls
  = 
+%5B
 %22htt
@@ -1101,93 +1101,236 @@
 obuf
-.git%22,%0A            commit = %227b28271a61a3da0a37f6fda399b0c4c86464e5b3%22,  # 2018-11-16
+/archive/7b28271a61a3da0a37f6fda399b0c4c86464e5b3.tar.gz%22%5D,%0A            strip_prefix = %22protobuf-7b28271a61a3da0a37f6fda399b0c4c86464e5b3%22,%0A            sha256 = %229dac7d7cf6e2c88bf92915f9338a26950531c00c05bf86764ab978344b69a45a%22,
 %0A   

Use http_archive for protobuf repository (#163)