/
repositories.bzl
99 lines (87 loc) · 3.8 KB
/
repositories.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
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
"""Workspace rules (repositories)"""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load(":private/versions.bzl", "check_version")
def rules_haskell_dependencies():
"""Provide all repositories that are necessary for `rules_haskell` to function."""
if "bazel_version" in dir(native):
check_version(native.bazel_version)
maybe(
http_archive,
name = "platforms",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.3/platforms-0.0.3.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.3/platforms-0.0.3.tar.gz",
],
sha256 = "460caee0fa583b908c622913334ec3c1b842572b9c23cf0d3da0c2543a1a157d",
)
maybe(
http_archive,
name = "bazel_skylib",
urls = [
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
],
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
)
maybe(
http_archive,
name = "rules_cc",
sha256 = "cb8ce8a25464b2a8536450971ad1b45ee309491c1f5e052a611b9e249cfdd35d",
strip_prefix = "rules_cc-40548a2974f1aea06215272d9c2b47a14a24e556",
urls = ["https://github.com/bazelbuild/rules_cc/archive/40548a2974f1aea06215272d9c2b47a14a24e556.tar.gz"],
)
maybe(
http_archive,
name = "rules_python",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.1.0/rules_python-0.1.0.tar.gz",
sha256 = "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0",
)
maybe(
http_archive,
name = "rules_sh",
sha256 = "83a065ba6469135a35786eb741e17d50f360ca92ab2897857475ab17c0d29931",
strip_prefix = "rules_sh-0.2.0",
urls = ["https://github.com/tweag/rules_sh/archive/v0.2.0.tar.gz"],
)
maybe(
http_archive,
name = "io_tweag_rules_nixpkgs",
sha256 = "7aee35c95251c1751e765f7da09c3bb096d41e6d6dca3c72544781a5573be4aa",
strip_prefix = "rules_nixpkgs-0.8.0",
urls = ["https://github.com/tweag/rules_nixpkgs/archive/v0.8.0.tar.gz"],
)
maybe(
http_archive,
name = "com_google_protobuf",
sha256 = "f18a40816260a9a3190a94efb0fc26270b244a2436681602f0a944739095d632",
strip_prefix = "protobuf-3.15.1",
urls = [
"https://github.com/google/protobuf/archive/v3.15.1.tar.gz",
],
)
# Dependency of com_google_protobuf.
# TODO(judahjacobson): this is a bit of a hack.
# We can't call that repository's protobuf_deps() function
# from here, because load()ing it from this .bzl file would lead
# to a cycle:
# https://github.com/bazelbuild/bazel/issues/1550
# https://github.com/bazelbuild/bazel/issues/1943
# For now, just hard-code the subset that's needed to use `protoc`.
# Alternately, consider adding another function from another
# .bzl file that needs to be called from WORKSPACE, similar to:
# https://github.com/grpc/grpc/blob/8c9dcf7c35e489c2072a9ad86635dbc4e28f88ea/bazel/grpc_extra_deps.bzl#L10
maybe(
http_archive,
name = "zlib",
build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff",
strip_prefix = "zlib-1.2.11",
urls = ["https://github.com/madler/zlib/archive/v1.2.11.tar.gz"],
)
def haskell_repositories():
"""Alias for rules_haskell_dependencies
Deprecated:
Use rules_haskell_dependencies instead.
"""
rules_haskell_dependencies()