v2.22.0
Using Bzlmod with Bazel 6:
- Enable with
common --enable_bzlmodin.bazelrc. - Add to your
MODULE.bazelfile:
bazel_dep(name = "aspect_bazel_lib", version = "2.22.0")Read more about bzlmod: https://blog.aspect.dev/bzlmod
Using WORKSPACE
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_bazel_lib",
sha256 = "fc459ce72f198d3822cfaf8ddcd07f2afef71d356d1f0fe513bb1638c5094bbd",
strip_prefix = "bazel-lib-2.22.0",
url = "https://github.com/bazel-contrib/bazel-lib/releases/download/v2.22.0/bazel-lib-v2.22.0.tar.gz",
)
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "aspect_bazel_lib_register_toolchains")
# Required bazel-lib dependencies
aspect_bazel_lib_dependencies()
# Required rules_shell dependencies
load("@rules_shell//shell:repositories.bzl", "rules_shell_dependencies", "rules_shell_toolchains")
rules_shell_dependencies()
rules_shell_toolchains()
# Register bazel-lib toolchains
aspect_bazel_lib_register_toolchains()
# Create the host platform repository transitively required by bazel-lib
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("@platforms//host:extension.bzl", "host_platform_repo")
maybe(
host_platform_repo,
name = "host_platform",
)What's Changed
- fix(2.x): alias coreutils and copy toolchains to bazel_lib by @alexeagle in #1216
Full Changelog: v2.21.2...v2.22.0