-
Notifications
You must be signed in to change notification settings - Fork 20
/
deps.bzl
101 lines (89 loc) · 3.35 KB
/
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
89
90
91
92
93
94
95
96
97
98
99
100
101
"""Repository macro to load remote dependencies."""
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
def martian_dependencies(
rules_nodejs_version = "4.7.0",
rules_nodejs_sha = "6f15d75f9e99c19d9291ff8e64e4eb594a6b7d25517760a75ad3621a7a48c2df"):
"""Loads remote repositories required to build martian.
Args:
rules_nodejs_version: Override the default version of rules_nodejs.
rules_nodejs_sha: Override the expected checksum for rules_nodejs.
"""
# Do this before gazelle_dependencies because gazelle wants
# an older version.
# This should actually already have been brought in by rules_go, but is
# added here for clarity.
maybe(
http_archive,
name = "bazel_skylib",
# 1.6.1, latest as of 2024-05-20
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.6.1/bazel-skylib-1.6.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.6.1/bazel-skylib-1.6.1.tar.gz",
],
sha256 = "9f38886a40548c6e96c106b752f242130ee11aaa068a56ba7e56f4511f33e4f2",
)
# Also do this before gazelle_dependencies.
maybe(
go_repository,
name = "org_golang_x_sys",
# v0.20.0, latest as of 2024-05-20
version = "v0.20.0",
sum = "h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=",
importpath = "golang.org/x/sys",
)
gazelle_dependencies()
maybe(
go_repository,
name = "com_github_dustin_go_humanize",
commit = "9f541cc9db5d55bce703bd99987c9d5cb8eea45e",
importpath = "github.com/dustin/go-humanize",
)
maybe(
go_repository,
name = "com_github_google_shlex",
commit = "e7afc7fbc51079733e9468cdfd1efcd7d196cd1d",
importpath = "github.com/google/shlex",
)
maybe(
go_repository,
name = "com_github_martian_lang_docopt_go",
commit = "57cc8f5f669dae55ae1beb7a6310ea2f58ea61d5",
importpath = "github.com/martian-lang/docopt.go",
)
maybe(
# This actually already brought in by rules_go, and
# is included here mostly for clarity.
go_repository,
name = "org_golang_x_tools",
# v0.21.0, latest as of 2024-05-20
version = "v0.21.0",
importpath = "golang.org/x/tools",
sum = "h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw=",
)
maybe(
http_archive,
name = "build_bazel_rules_nodejs",
sha256 = rules_nodejs_sha,
urls = [
"https://github.com/bazelbuild/rules_nodejs/releases/download/" +
"{}/rules_nodejs-{}.tar.gz".format(
rules_nodejs_version,
rules_nodejs_version,
),
],
)
python_rules_tag = "0.8.1"
python_rules_sha = "cdf6b84084aad8f10bf20b46b77cb48d83c319ebe6458a18e9d2cebf57807cdd"
maybe(
http_archive,
name = "rules_python",
sha256 = python_rules_sha,
strip_prefix = "rules_python-" + python_rules_tag,
urls = [
"https://github.com/bazelbuild/rules_python/archive/refs/tags/{}.tar.gz".format(
python_rules_tag,
),
],
)