Update nix crate to 0.25 and narrow features (#6924)

Avoids compiling the crate twice due to incompatible versions from
dependencies. This avoids binary bloat before linking as well.
Narrow our feature selection to the used modules/functions to save
compile time. On my machine reduces `nix` crate compile time from 
around 9 secs to 0.9 secs.
This commit is contained in:
Stefan Holderbach 2022-10-28 01:07:13 +02:00 committed by GitHub
parent 834522d002
commit 8838815737
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 17 deletions

18
Cargo.lock generated
View file

@ -891,7 +891,7 @@ version = "3.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d91974fbbe88ec1df0c24a4f00f99583667a7e2e6272b2b92d294d81e462173"
dependencies = [
"nix 0.25.0",
"nix",
"winapi 0.3.9",
]
@ -2408,18 +2408,6 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
[[package]]
name = "nix"
version = "0.24.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc"
dependencies = [
"bitflags",
"cfg-if 1.0.0",
"libc",
"memoffset",
]
[[package]]
name = "nix"
version = "0.25.0"
@ -2517,7 +2505,7 @@ dependencies = [
"itertools",
"log",
"miette",
"nix 0.24.2",
"nix",
"nu-ansi-term",
"nu-cli",
"nu-color-config",
@ -2811,7 +2799,7 @@ dependencies = [
"libproc",
"log",
"mach2",
"nix 0.24.2",
"nix",
"ntapi 0.3.7",
"once_cell",
"procfs",

View file

@ -69,7 +69,7 @@ signal-hook = { version = "0.3.14", default-features = false }
winres = "0.1"
[target.'cfg(target_family = "unix")'.dependencies]
nix = "0.24"
nix = { version = "0.25", default-features = false, features = ["signal", "process", "fs", "term"]}
atty = "0.2"
[dev-dependencies]

View file

@ -18,7 +18,7 @@ libc = "0.2"
log = "0.4"
[target.'cfg(target_family = "unix")'.dependencies]
nix = "0.24"
nix = { version = "0.25", default-features = false, features = ["fs", "term", "process", "signal"]}
atty = "0.2"
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]