blob: cac85ed5334d5f3b79e6929dab25f1292950c2c0 [file] [log] [blame] [edit]
# 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_rust//rust:defs.bzl", "rust_binary", "rust_test")
load("//bazel/portage/build_defs:common.bzl", "RUSTC_DEBUG_FLAGS")
rust_binary(
name = "build_package",
srcs = glob(["src/*.rs"]),
crate_name = "build_package",
data = [
":build_package.sh",
],
rustc_flags = RUSTC_DEBUG_FLAGS,
visibility = ["@portage//:__subpackages__"],
deps = [
"//bazel/portage/common/cliutil",
"//bazel/portage/common/container",
"//bazel/portage/common/fileutil",
"@alchemy_crates//:anyhow",
"@alchemy_crates//:chrono",
"@alchemy_crates//:clap",
"@alchemy_crates//:nix",
"@alchemy_crates//:rand",
"@alchemy_crates//:serde",
"@alchemy_crates//:serde_json",
"@rules_rust//tools/runfiles",
],
)
rust_test(
name = "build_package_test",
size = "small",
crate = ":build_package",
rustc_flags = RUSTC_DEBUG_FLAGS,
)