Skip to content

Commit

Permalink
chore(bazel): add MODULE.bazel files for bzlmod
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 committed Mar 1, 2024
1 parent 6fb29c6 commit 46f0667
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
common --enable_bzlmod
10 changes: 10 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module(
name = "envoy_build_tools",
version = "",
)

bazel_dep(name = "bazel_skylib", version = "1.3.0")
# -- bazel_dep definitions -- #

non_module_deps = use_extension("//:non_module_deps.bzl", "non_module_deps")
use_repo(non_module_deps, "bazel_toolchains")
11 changes: 11 additions & 0 deletions non_module_deps.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

def _non_module_deps_impl(ctx):
http_archive(
name = "bazel_toolchains",
sha256 = "02e4f3744f1ce3f6e711e261fd322916ddd18cccd38026352f7a4c0351dbda19",
strip_prefix = "bazel-toolchains-5.1.2",
urls = ["https://github.com/bazelbuild/bazel-toolchains/archive/refs/tags/v5.1.2.tar.gz"],
)

non_module_deps = module_extension(implementation = _non_module_deps_impl)

0 comments on commit 46f0667

Please sign in to comment.