Using bzlmod with Bazel 6 or later:
-
Add
common --enable_bzlmod
to.bazelrc
. -
Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_elm", version = "1.0.1")
# Declare external elm dependencies, for example:
elm = use_extension("@rules_elm//elm:extensions.bzl", "elm")
elm.repository(
name = "elm_package_elm_core",
sha256 = "6e37b11c88c89a68d19d0c7625f1ef39ed70c59e443def95e4de98d6748c80a7",
strip_prefix = "core-1.0.5",
urls = ["https://github.com/elm/core/archive/1.0.5.tar.gz"],
)
use_repo(elm, "elm_package_elm_core")
Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_elm",
sha256 = "cc113f718cbe04769bad65c29592d402367393480c5e8e2b7c82652fa8c1fe61",
strip_prefix = "rules_elm-1.0.1",
urls = "https://github.com/kczulko/rules_elm/releases/download/v1.0.1/rules_elm-1.0.1.tar.gz",
)
load("@rules_elm//elm:dependencies.bzl", "elm_dependencies")
elm_dependencies()
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
rules_js_dependencies() # rules_elm depends on rules_js
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories() # rules_elm depends on rules_python
load("@rules_elm//elm:repositories.bzl", "elm_register_toolchains")
elm_register_toolchains()
load("@rules_elm_npm//:repositories.bzl", elm_npm_repositories = "npm_repositories")
elm_npm_repositories()
Full Changelog: v1.0.0...v1.0.1