blob: 5ea4ece7430b402989486fc20dfcd170a2d75a6e [file]
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################
module(
name = "zephyr-bazel",
version = "0.0.1",
)
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_python", version = "1.8.3")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
use_repo(python, "pythons_hub")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "zephyr_bazel_pip_deps",
python_version = "3.11",
requirements_lock = "//scripts:requirements-lock.txt",
)
pip.parse(
hub_name = "zephyr_bazel_pip_deps",
python_version = "3.12",
requirements_lock = "//scripts:requirements-lock.txt",
)
use_repo(pip, "zephyr_bazel_pip_deps")
zephyr_patch_file = use_extension("//:setup.bzl", "zephyr_patch_file")
zephyr_patch_file.checkout(
# The autoroller is broken. Manually update on 2025-12-12.
commit = "3568e1b6d5cdd51a6b964a2a1d6d29200fea2056",
)
use_repo(zephyr_patch_file, "zephyr")
# The @kconfig repo will be overriden by any downstream project that uses
# zephyr-bazel. This is needed because zephyr-bazel macros like
# zephyr_cc_library can reference @kconfig flags even outside zephyr, for
# example, when building a zephyr backend of some Pigweed modules.
kconfig = use_extension("//:kconfig.bzl", "kconfig")
kconfig.tree(
boards = ["native_sim"],
workspace_root = "//:MODULE.bazel",
zephyr_root = "@zephyr",
)
use_repo(kconfig, "kconfig")