Compare commits

..

No commits in common. "6705c283aff30b4b982cd130b43428843b98f975" and "f7aa8942e051b2f97949708802f1c90333d2512d" have entirely different histories.

5 changed files with 1 additions and 36 deletions

17
Cargo.lock generated
View file

@ -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",

View file

@ -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"

View file

@ -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) \

View file

@ -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
}
}

View file

@ -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<u8> = Default::default();
man.render(&mut buffer)?;
std::fs::write(file_path, buffer)?;
return Ok(());
}
};
let answer = send_command(&args.socket, daemon_command)?;
print!("{}", answer);