Update nsc-helper crates

This commit is contained in:
Victor Fuentes 2022-10-28 10:48:16 -04:00
parent 0ff92e7cc9
commit 0bf5c77fff
No known key found for this signature in database
GPG Key ID: 0A88B68D6A9ACAE0
3 changed files with 12 additions and 57 deletions

57
Cargo.lock generated
View File

@ -285,28 +285,11 @@ dependencies = [
"atty", "atty",
"bitflags", "bitflags",
"strsim 0.8.0", "strsim 0.8.0",
"textwrap 0.11.0", "textwrap",
"unicode-width", "unicode-width",
"vec_map", "vec_map",
] ]
[[package]]
name = "clap"
version = "3.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
dependencies = [
"atty",
"bitflags",
"clap_derive 3.2.18",
"clap_lex 0.2.4",
"indexmap",
"once_cell",
"strsim 0.10.0",
"termcolor",
"textwrap 0.16.0",
]
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.0.18" version = "4.0.18"
@ -315,26 +298,13 @@ checksum = "335867764ed2de42325fafe6d18b8af74ba97ee0c590fa016f157535b42ab04b"
dependencies = [ dependencies = [
"atty", "atty",
"bitflags", "bitflags",
"clap_derive 4.0.18", "clap_derive",
"clap_lex 0.3.0", "clap_lex",
"once_cell", "once_cell",
"strsim 0.10.0", "strsim 0.10.0",
"termcolor", "termcolor",
] ]
[[package]]
name = "clap_derive"
version = "3.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
dependencies = [
"heck",
"proc-macro-error",
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "clap_derive" name = "clap_derive"
version = "4.0.18" version = "4.0.18"
@ -348,15 +318,6 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "clap_lex"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
dependencies = [
"os_str_bytes",
]
[[package]] [[package]]
name = "clap_lex" name = "clap_lex"
version = "0.3.0" version = "0.3.0"
@ -1744,7 +1705,7 @@ dependencies = [
name = "nsc-helper" name = "nsc-helper"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"clap 3.2.23", "clap 4.0.18",
"users", "users",
] ]
@ -1847,9 +1808,9 @@ dependencies = [
[[package]] [[package]]
name = "os_str_bytes" name = "os_str_bytes"
version = "6.3.0" version = "6.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" checksum = "3baf96e39c5359d2eb0dd6ccb42c62b91d9678aa68160d261b9e0ccbf9e9dea9"
[[package]] [[package]]
name = "owo-colors" name = "owo-colors"
@ -2776,12 +2737,6 @@ dependencies = [
"unicode-width", "unicode-width",
] ]
[[package]]
name = "textwrap"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "1.0.37" version = "1.0.37"

View File

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
clap = { version = "3.2", features = ["derive"] } clap = { version = "4.0", features = ["derive"] }
users = "0.11" users = "0.11"
[[bin]] [[bin]]

View File

@ -6,11 +6,11 @@ use std::{
process::Command, process::Command,
}; };
#[derive(clap::Subcommand)] #[derive(Subcommand, Debug)]
enum SubCommands { enum SubCommands {
Config { Config {
/// Write stdin to file in path output /// Write stdin to file in path output
#[clap(short, long)] #[arg(short, long)]
output: String, output: String,
/// Run `nixos-rebuild` with the given arguments /// Run `nixos-rebuild` with the given arguments
arguments: Vec<String>, arguments: Vec<String>,
@ -21,17 +21,17 @@ enum SubCommands {
}, },
Channel { Channel {
/// Whether to rebuild the system after updating channels /// Whether to rebuild the system after updating channels
#[clap(short, long)] #[arg(short, long)]
rebuild: bool, rebuild: bool,
/// Run `nixos-rebuild` with the given arguments /// Run `nixos-rebuild` with the given arguments
arguments: Vec<String>, arguments: Vec<String>,
}, },
Flake { Flake {
/// Whether to rebuild the system after updating flake /// Whether to rebuild the system after updating flake
#[clap(short, long)] #[arg(short, long)]
rebuild: bool, rebuild: bool,
/// Path to the flake file /// Path to the flake file
#[clap(short, long)] #[arg(short, long)]
flakepath: String, flakepath: String,
/// Run `nixos-rebuild` with the given arguments /// Run `nixos-rebuild` with the given arguments
arguments: Vec<String>, arguments: Vec<String>,