| # Copyright 2023 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| load("//cipd:defs.bzl", "cipd_repository") |
| load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") |
| |
| def shac_deps(): |
| # Fetch the Shac tool |
| |
| maybe( |
| name = "shac", |
| repo_rule = cipd_repository, |
| build_file = "@fuchsia_infra//manifests:shac.BUILD.bazel", |
| cipd_bin = "@cipd_tool//:cipd", |
| ensure_file = "@fuchsia_infra//manifests:shac.ensure", |
| ) |
| |
| tools = [ |
| "clang", |
| "black", |
| "buildifier", |
| ] |
| |
| for t in tools: |
| maybe( |
| name = t, |
| repo_rule = cipd_repository, |
| build_file_content = "exports_files( glob([ \"*\"]))", |
| cipd_bin = "@cipd_tool//:cipd", |
| ensure_file = "@fuchsia_infra//manifests:{name}.ensure".format(name = t), |
| ) |