| # Copyright 2022 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files", "strip_prefix") |
| load("@rules_pkg//pkg:tar.bzl", "pkg_tar") |
| |
| exports_files([ |
| "tools/bazel", |
| "Cargo.toml", |
| "Cargo.lock", |
| ]) |
| |
| # TODO: Move to src/scripts/BUILD.bazel. |
| pkg_files( |
| name = "scripts_src_files", |
| srcs = glob( |
| ["scripts/**"], |
| exclude = ["scripts/.git/**"], |
| ), |
| attributes = pkg_attributes( |
| mode = "0755", |
| ), |
| prefix = "/mnt/host/source/src", |
| strip_prefix = strip_prefix.from_root(), |
| visibility = ["//visibility:private"], |
| ) |
| |
| # TODO: Move to src/scripts/BUILD.bazel. |
| pkg_tar( |
| name = "scripts_src", |
| srcs = [ |
| ":scripts_src_files", |
| ], |
| compressor = "//bazel/portage/repo_defs/zstd", |
| compressor_args = "--threads=0", |
| extension = "tar.zst", |
| visibility = ["@portage//images:__pkg__"], |
| ) |
| |
| # A convenient alias to run alchemist. |
| # |
| # Example: |
| # bazel run //:alchemist -- --board=amd64-generic dump-package sys-apps/attr |
| alias( |
| name = "alchemist", |
| actual = "@alchemist//:alchemist", |
| visibility = ["//visibility:private"], |
| ) |