Skip to main content
Glama
toolchain.bzl1.32 kB
ShellToolchainInfo = provider( fields = { "build_context": typing.Any, "editorconfig": provider_field(typing.Any, default = None), "shellcheck": typing.Any, "shfmt_check": typing.Any, }, ) def shell_toolchain_impl(ctx) -> list[[DefaultInfo, ShellToolchainInfo]]: """ A shell toolchain. """ if ctx.attrs.editorconfig: editorconfig = ctx.attrs.editorconfig[DefaultInfo].default_outputs[0] else: editorconfig = None return [ DefaultInfo(), ShellToolchainInfo( build_context = ctx.attrs._build_context, editorconfig = editorconfig, shellcheck = ctx.attrs._shellcheck, shfmt_check = ctx.attrs._shfmt_check, ), ] shell_toolchain = rule( impl = shell_toolchain_impl, attrs = { "editorconfig": attrs.option( attrs.dep(providers = [DefaultInfo]), default = None, ), "_build_context": attrs.dep( default = "prelude-si//shell:build_context.py", ), "_shellcheck": attrs.dep( default = "prelude-si//shell:shellcheck.py", ), "_shfmt_check": attrs.dep( default = "prelude-si//shell:shfmt_check.py", ), }, is_toolchain_rule = True, )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server