| # Copyright lowRISC contributors. |
| # Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| # SPDX-License-Identifier: Apache-2.0 |
| exports_files(glob(["**"])) |
| def _hooks_setup_impl(rctx): |
| hooks_dir = rctx.os.environ.get("MANUFACTURER_HOOKS_DIR", rctx.attr.dummy) |
| rctx.file("repos.bzl", _TEMPLATE.format(hooks_dir = hooks_dir)) |
| rctx.file("BUILD.bazel", _BUILD) |
| hooks_setup = repository_rule( |
| implementation = _hooks_setup_impl, |
| doc = "Location of the dummy hooks directory.", |
| environ = ["MANUFACTURER_HOOKS_DIR"], |