generated from bazel-contrib/rules-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
internal_deps.bzl
88 lines (78 loc) · 3.65 KB
/
internal_deps.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
"""Our "development" dependencies
Users should *not* need to install these. If users see a load()
statement from these, that's a bug in our distribution.
"""
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", _http_archive = "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
def http_archive(name, **kwargs):
maybe(_http_archive, name = name, **kwargs)
def rules_sol_internal_deps():
"Fetch deps needed for local development"
http_archive(
name = "build_bazel_integration_testing",
urls = [
"https://github.com/bazelbuild/bazel-integration-testing/archive/165440b2dbda885f8d1ccb8d0f417e6cf8c54f17.zip",
],
strip_prefix = "bazel-integration-testing-165440b2dbda885f8d1ccb8d0f417e6cf8c54f17",
sha256 = "2401b1369ef44cc42f91dc94443ef491208dbd06da1e1e10b702d8c189f098e3",
)
http_archive(
name = "io_bazel_rules_go",
sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
],
)
http_archive(
name = "bazel_gazelle",
sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
],
)
# Override bazel_skylib distribution to fetch sources instead
# so that the gazelle extension is included
# see https://github.com/bazelbuild/bazel-skylib/issues/250
http_archive(
name = "bazel_skylib",
sha256 = "07b4117379dde7ab382345c3b0f5edfc6b7cff6c93756eac63da121e0bbcc5de",
strip_prefix = "bazel-skylib-1.1.1",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/1.1.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/archive/refs/tags/1.1.1.tar.gz",
],
)
http_archive(
name = "io_bazel_stardoc",
sha256 = "05fb57bb4ad68a360470420a3b6f5317e4f722839abc5b17ec4ef8ed465aaa47",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.2/stardoc-0.5.2.tar.gz",
"https://github.com/bazelbuild/stardoc/releases/download/0.5.2/stardoc-0.5.2.tar.gz",
],
)
http_archive(
name = "aspect_bazel_lib",
sha256 = "1cbbf62315d303c8083d5019a4657623d4f58e925fb51bdc8a41bad4a131f5c9",
strip_prefix = "bazel-lib-1.8.1",
url = "https://github.com/aspect-build/bazel-lib/archive/refs/tags/v1.8.1.tar.gz",
)
# Demonstrate fetching a dependency directly from a git repo, like Forge does it:
# https://book.getfoundry.sh/projects/dependencies
new_git_repository(
name = "openzeppelin-contracts",
remote = "https://github.com/OpenZeppelin/openzeppelin-contracts.git",
commit = "8c49ad74eae76ee389d038780d407cf90b4ae1de", # v4.7.0
shallow_since = "1656493217 +0200",
build_file_content = """\
load("@aspect_rules_sol//sol:defs.bzl", "sol_sources")
package(default_visibility = ["//visibility:public"])
sol_sources(
name = "openzeppelin-contracts",
srcs = glob(["**/*.sol"]),
remappings = {"@openzeppelin/contracts/": "./external/openzeppelin-contracts/contracts/"},
)
""",
)