| # Copyright 2021 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. |
| |
| # This build definition exists in order to define an allow-list of users of |
| # the nix third-party crate. Currently and for the foreseeable future, the |
| # allow-list is limited to the fuchsia_nix in-tree crate, which selectively |
| # reexports (and provides test coverage for) those nix interfaces which: |
| # |
| # * have a concrete fuchsia use-case |
| # * have been shown to work on fuchsia |
| # |
| # In-tree users of the nix crate must do so indirectly through re-exported |
| # interfaces in fuchsia_nix. fuchsia_nix exists so that nix interfaces can be |
| # vetted as appropriate to Fuchsia OS principles, and validated as working on |
| # Fuchsia. For example, we do not want nix interfaces to POSIX signals to be |
| # available in-tree because signals do not exist on Fuchsia. |
| |
| # TODO(https://fxbug.dev/72581) move this to GN config for visibility under |
| # cfg(fuchsia) |
| if (is_fuchsia) { |
| rust_library("nix") { |
| visibility = [ "//src/lib/network/fuchsia_nix" ] |
| |
| # The contents of this build defintion are copied from the |
| # //third_party/rust_crates/BUILD.gn definition which is generated by |
| # cargo-gnaw from //third_party/rust_crates/Cargo.toml. |
| # |
| # Until https://fxbug.dev/72581 is resolved, this definition must be updated |
| # manually as follows: |
| # |
| # 1. Increment the nix version number in |
| # //third_party/rust_crates/Cargo.toml. |
| # 2. Run `fx update-rustc-third-party`. |
| # 3. Copy below this comment the contents of the generated |
| # `rust_library("nix-v*")` definition found in |
| # //third_party/rust_crates/BUILD.gn. |
| # 4. Run `fx build`. |
| # 5. If GN asks for an explicit `sources` value, copy the GN generated value |
| # into the definition. |
| |
| crate_name = "nix" |
| crate_root = "//third_party/rust_crates/vendor/nix/src/lib.rs" |
| output_name = "nix-212f6cb0e58efa58" |
| configs -= [ |
| "//build/config/rust:edition_2018", |
| "//build/config/rust:2018_idioms", |
| ] |
| |
| deps = [] |
| deps += [ "../..:bitflags-v1_2_1" ] |
| deps += [ "../..:cfg-if-v1_0_0" ] |
| deps += [ "../..:libc-v0_2_88" ] |
| |
| rustenv = [] |
| |
| rustflags = [ |
| "--cap-lints=allow", |
| "--edition=2018", |
| "-Cmetadata=212f6cb0e58efa58", |
| "-Cextra-filename=-212f6cb0e58efa58", |
| ] |
| sources = [ |
| "//third_party/rust_crates/vendor/nix/src/dir.rs", |
| "//third_party/rust_crates/vendor/nix/src/env.rs", |
| "//third_party/rust_crates/vendor/nix/src/errno.rs", |
| "//third_party/rust_crates/vendor/nix/src/fcntl.rs", |
| "//third_party/rust_crates/vendor/nix/src/features.rs", |
| "//third_party/rust_crates/vendor/nix/src/lib.rs", |
| "//third_party/rust_crates/vendor/nix/src/macros.rs", |
| "//third_party/rust_crates/vendor/nix/src/net/if_.rs", |
| "//third_party/rust_crates/vendor/nix/src/net/mod.rs", |
| "//third_party/rust_crates/vendor/nix/src/poll.rs", |
| "//third_party/rust_crates/vendor/nix/src/sched.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/mman.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/mod.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/pthread.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/select.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/signal.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/socket/addr.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/socket/mod.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/socket/sockopt.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/stat.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/statvfs.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/termios.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/time.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/uio.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/utsname.rs", |
| "//third_party/rust_crates/vendor/nix/src/sys/wait.rs", |
| "//third_party/rust_crates/vendor/nix/src/time.rs", |
| "//third_party/rust_crates/vendor/nix/src/unistd.rs", |
| ] |
| } |
| } |