-
Notifications
You must be signed in to change notification settings - Fork 240
/
Copy pathMODULE.bazel
46 lines (39 loc) · 1.66 KB
/
MODULE.bazel
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
module(name = "jsonnet_go", version = "0.21.0-rc2")
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 = "c19ca480c1d9d74d18e3e3c872bf1761eba09c9b7e4029bf3862046e73d191f6"
CPP_JSONNET_GITHASH = "5ad56d2c07610f502f5ca4eef1a478adbfd7e13b"
CPP_JSONNET_RELEASE_VERSION = "v0.21.0-rc2"
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.42.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_go", version = "0.53.0", repo_name = "io_bazel_rules_go")
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.23.7")
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "@jsonnet_go//:go.mod")
use_repo(
go_deps,
"com_github_fatih_color",
"com_github_sergi_go_diff",
"io_k8s_sigs_yaml",
"org_golang_x_crypto",
)