Skip to content

Commit

Permalink
Update repositories.bzl (#363)
Browse files Browse the repository at this point in the history
The repository now requires skylib and zlib, since the Protobuf update (#341, #344).
  • Loading branch information
laurentlb authored Apr 26, 2019
1 parent 50d3dc9 commit 8f75aab
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ First you must [install Bazel]. Then you add the following to your `WORKSPACE`
file:

```python
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_closure",
sha256 = "a80acb69c63d5f6437b099c111480a4493bad4592015af2127a2f49fb7512d8d",
Expand Down
30 changes: 29 additions & 1 deletion closure/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ load("//closure/private:platform_http_file.bzl", "platform_http_file")
def closure_repositories(
omit_aopalliance = False,
omit_args4j = False,
omit_bazel_skylib = False,
omit_clang = False,
omit_com_google_auto_common = False,
omit_com_google_auto_factory = False,
Expand Down Expand Up @@ -67,14 +68,17 @@ def closure_repositories(
omit_org_ow2_asm_commons = False,
omit_org_ow2_asm_tree = False,
omit_org_ow2_asm_util = False,
omit_phantomjs = False):
omit_phantomjs = False,
omit_zlib = False):
"""Imports dependencies for Closure Rules."""
if omit_com_google_protobuf_java:
fail("omit_com_google_protobuf_java no longer supported and must be not be passed to closure_repositories()")
if not omit_aopalliance:
aopalliance()
if not omit_args4j:
args4j()
if not omit_bazel_skylib:
bazel_skylib()
if not omit_clang:
clang()
if not omit_com_google_auto_common:
Expand Down Expand Up @@ -167,6 +171,8 @@ def closure_repositories(
org_ow2_asm_util()
if not omit_phantomjs:
phantomjs()
if not omit_zlib:
zlib()

# BEGIN_DECLARATIONS

Expand All @@ -193,6 +199,14 @@ def args4j():
licenses = ["notice"], # MIT License
)

def bazel_skylib():
http_archive(
name = "bazel_skylib",
sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d",
strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b",
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"],
)

def clang():
platform_http_file(
name = "clang",
Expand Down Expand Up @@ -971,3 +985,17 @@ def phantomjs():
],
macos_sha256 = "538cf488219ab27e309eafc629e2bcee9976990fe90b1ec334f541779150f8c1",
)

def zlib():
http_archive(
name = "net_zlib",
build_file = "@io_bazel_rules_closure//:third_party/zlib.BUILD",
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
strip_prefix = "zlib-1.2.11",
urls = ["https://zlib.net/zlib-1.2.11.tar.gz"],
)

native.bind(
name = "zlib",
actual = "@net_zlib//:zlib",
)

0 comments on commit 8f75aab

Please sign in to comment.