From 2a4422997d4e2565875e629b79d5bfe077b257ac Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 13 Sep 2021 20:09:13 +0200 Subject: [PATCH] Restrict some crates to specific OS --- Cargo.toml | 7 +++++-- src/uucore/Cargo.toml | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 58b6aa52a..7b1399abf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -366,7 +366,6 @@ conv = "0.3" filetime = "0.2" glob = "0.3.0" libc = "0.2" -nix = "0.20.0" pretty_assertions = "0.7.2" rand = "0.7" regex = "1.0" @@ -378,8 +377,12 @@ uucore = { version=">=0.0.9", package="uucore", path="src/uucore", features=["en walkdir = "2.2" atty = "0.2" -[target.'cfg(unix)'.dev-dependencies] +[target.'cfg(target_os = "linux")'.dev-dependencies] rlimit = "0.4.0" + +[target.'cfg(unix)'.dev-dependencies] +nix = "0.20.0" + rust-users = { version="0.10", package="users" } unix_socket = "0.5.0" diff --git a/src/uucore/Cargo.toml b/src/uucore/Cargo.toml index 80a3a115b..3f2276bd3 100644 --- a/src/uucore/Cargo.toml +++ b/src/uucore/Cargo.toml @@ -24,13 +24,15 @@ wild = "2.0" # * optional thiserror = { version="1.0", optional=true } time = { version="<= 0.1.43", optional=true } -walkdir = { version="2.3.2", optional=true } # * "problem" dependencies (pinned) data-encoding = { version="2.1", optional=true } data-encoding-macro = { version="0.1.12", optional=true } z85 = { version="3.0.3", optional=true } libc = { version="0.2.15", optional=true } once_cell = "1.8.0" + +[target.'cfg(unix)'.dependencies] +walkdir = { version="2.3.2", optional=true } nix = { version="0.20", optional=true } [dev-dependencies]