Skip to content

Commit 6cb835e

Browse files
comiusfmeum
andauthored
Add bzl_libraries (#8)
Needed to generate documentation for build encyclopedia. There are links in Bazel docs to sh rules and the generator complains if the Sh rules docs are removed / break those links. --------- Co-authored-by: Fabian Meumertzheim <[email protected]>
1 parent bfdfa00 commit 6cb835e

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

MODULE.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module(
44
)
55

66
bazel_dep(name = "platforms", version = "0.0.10")
7+
bazel_dep(name = "bazel_skylib", version = "1.6.1")
78

89
sh_configure = use_extension("//shell/private/extensions:sh_configure.bzl", "sh_configure")
910
use_repo(sh_configure, "local_config_shell")

shell/BUILD

+14
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,21 @@
99
# Bazel's sh_* rules.
1010
#
1111
# Toolchains registered for this type should have target constraints.
12+
13+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
14+
1215
toolchain_type(
1316
name = "toolchain_type",
1417
visibility = ["//visibility:public"],
1518
)
19+
20+
bzl_library(
21+
name = "rules_bzl",
22+
srcs = [
23+
"sh_binary.bzl",
24+
"sh_library.bzl",
25+
"sh_test.bzl",
26+
],
27+
visibility = ["//visibility:public"],
28+
deps = ["//shell/private:private_bzl"],
29+
)

shell/private/BUILD

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
2+
3+
bzl_library(
4+
name = "private_bzl",
5+
srcs = ["sh_executable.bzl"],
6+
visibility = ["//shell:__pkg__"],
7+
)

0 commit comments

Comments
 (0)