| # Copyright 2020 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. |
| |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//src/sys/build/components.gni") |
| import("//src/sys/pkg/sysmgr_config.gni") |
| |
| rustc_binary("bin") { |
| name = "pkg_local_mirror" |
| edition = "2018" |
| deps = [ |
| ":lib", |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.fs:fuchsia.fs-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/syslog/rust:syslog", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| rustc_library("lib") { |
| visibility = [ |
| ":bin", |
| "//src/sys/pkg/lib/fuchsia-pkg-testing:*", |
| ] |
| name = "pkg_local_mirror" |
| edition = "2018" |
| deps = [ |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/syslog/rust:syslog", |
| "//src/sys/lib/fidl-fuchsia-pkg-ext", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ |
| "src/lib.rs", |
| "src/local_mirror_manager.rs", |
| ] |
| } |
| |
| fuchsia_component("component") { |
| deps = [ ":bin" ] |
| manifest = "meta/pkg-local-mirror.cml" |
| } |
| |
| fuchsia_package("pkg-local-mirror") { |
| deps = [ ":component" ] |
| } |