-
Notifications
You must be signed in to change notification settings - Fork 257
Expand file tree
/
Copy pathMODULE.bazel
More file actions
52 lines (41 loc) · 1.7 KB
/
MODULE.bazel
File metadata and controls
52 lines (41 loc) · 1.7 KB
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
module(name = "jsonnet_go")
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# NB: update_cpp_jsonnet.sh looks for these.
CPP_JSONNET_SHA256 = "fd581628cbdd454e5ee927d96c51ea5040f2e4afc06598542c62d40bcb361e6a"
CPP_JSONNET_GITHASH = "5aec27e03a61dae06461becb95089b15fe217233"
CPP_JSONNET_RELEASE_VERSION = "v0.22.0"
CPP_JSONNET_STRIP_PREFIX = (
"jsonnet-" + (
CPP_JSONNET_RELEASE_VERSION if CPP_JSONNET_RELEASE_VERSION else CPP_JSONNET_GITHASH
)
)
CPP_JSONNET_URL = (
"https://github.com/google/jsonnet/releases/download/%s/jsonnet-%s.tar.gz" % (
CPP_JSONNET_RELEASE_VERSION,
CPP_JSONNET_RELEASE_VERSION,
) if CPP_JSONNET_RELEASE_VERSION else "https://github.com/google/jsonnet/archive/%s.tar.gz" % CPP_JSONNET_GITHASH
)
# We don't use a normal bazel_dep reference for the cpp_jsonnet module,
# because we want to pin to the specific jsonnet commit (which might not
# even exactly match a released version).
http_archive(
name = "cpp_jsonnet",
sha256 = CPP_JSONNET_SHA256,
strip_prefix = CPP_JSONNET_STRIP_PREFIX,
urls = [CPP_JSONNET_URL],
)
bazel_dep(name = "gazelle", version = "0.47.0")
bazel_dep(name = "rules_go", version = "0.59.0")
# rules_cc is needed, because we pull in cpp_jsonnet Bazel module to get the standard library.
bazel_dep(name = "rules_cc", version = "0.2.14")
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.from_file(go_mod = "//:go.mod")
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
"com_github_fatih_color",
"com_github_sergi_go_diff",
"io_k8s_sigs_yaml",
"org_golang_x_crypto",
)