go-jsonnet/MODULE.bazel
John Bartholomew e1304d1698 update cppjsonnet and depend on a specific commit of jsonnet
This changes the bazel module dependencies so that the C++ jsonnet
repo dependency (which is actually used as the source for the
standard library and nothing else in the Bazel build) comes from
a specific commit of the jsonnet repo, rather than depending on
the 'published' jsonnet 0.20.0.

The two repos are tightly coupled anyway so I think this more
accurately reflects the situation. Particularly since the C++ repo
is also linked (at a specific commit) as a git submodule, which
is used for non-Bazel build and testing.
2025-01-20 21:45:24 +00:00

31 lines
1.1 KiB
Plaintext

module(name = "jsonnet_go", version = "0.0.0")
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 = "e7d14d8ad65dc334b9a9f3bd1c542a82b3b80029860a8d78fd829b23d0e9845b"
CPP_JSONNET_GITHASH = "5a4e8e34cc1fe841bdebb983646b9b9ae8fa8ca4"
# 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 = "jsonnet-%s" % CPP_JSONNET_GITHASH,
urls = ["https://github.com/google/jsonnet/archive/%s.tar.gz" % CPP_JSONNET_GITHASH],
)
bazel_dep(name = "gazelle", version = "0.41.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_go", version = "0.48.0", repo_name = "io_bazel_rules_go")
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",
)