diff --git a/Cargo.lock b/Cargo.lock index 1d674b1..78b6613 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -343,16 +343,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" -[[package]] -name = "clap_mangen" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf8e5f34d85d9e0bbe2491d100a7a7c1007bb2467b518080bfe311e8947197a9" -dependencies = [ - "clap", - "roff", -] - [[package]] name = "colorchoice" version = "1.0.0" @@ -958,12 +948,6 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" -[[package]] -name = "roff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b833d8d034ea094b1ea68aa6d5c740e0d04bad9d16568d08ba6f76823a114316" - [[package]] name = "rustix" version = "0.37.20" @@ -1181,7 +1165,6 @@ dependencies = [ "anyhow", "clap", "clap_complete_command", - "clap_mangen", "humantime", "libc", "notify-rust", diff --git a/Cargo.toml b/Cargo.toml index 9d57901..8c2f0e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,6 @@ edition = "2021" anyhow = "1.0.71" clap = { version = "4.3.4", features = ["derive"] } clap_complete_command = "0.5.1" -clap_mangen = "0.2.13" humantime = "2.1.0" libc = "0.2.147" notify-rust = "4.8.0" diff --git a/flake.nix b/flake.nix index c399655..ea2459e 100644 --- a/flake.nix +++ b/flake.nix @@ -13,13 +13,10 @@ in { packages.default = naersk-lib.buildPackage { - src = pkgs.lib.sourceFilesBySuffices ./. [ ".rs" ".toml" ".lock" ]; + src = ./.; nativeBuildInputs = with pkgs; [ installShellFiles ]; meta.mainProgram = "timers"; postInstall = '' - $out/bin/timers manpage timers.1 - installManPage timers.1 - installShellCompletion --cmd timers \ --bash <($out/bin/timers completions bash) \ --fish <($out/bin/timers completions fish) \ diff --git a/src/cli.rs b/src/cli.rs index f71c642..08daac2 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -61,12 +61,6 @@ pub enum Command { Completions { #[arg(value_enum)] shell: clap_complete_command::Shell, - }, - - /// Generate man page (section 1) - Manpage { - /// File to save the man page to - file_path: String } } diff --git a/src/main.rs b/src/main.rs index 7c7d841..2249f05 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,3 @@ -use std::io::Write; mod cli; mod daemon; mod helper; @@ -47,13 +46,6 @@ fn main() -> Result<(), anyhow::Error> { shell.generate(&mut Cli::command(), &mut std::io::stdout()); return Ok(()); } - CliCommand::Manpage { file_path } => { - let man = clap_mangen::Man::new(Cli::command()); - let mut buffer: Vec = Default::default(); - man.render(&mut buffer)?; - std::fs::write(file_path, buffer)?; - return Ok(()); - } }; let answer = send_command(&args.socket, daemon_command)?; print!("{}", answer);