6 , installShellCompletions ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
7 , installManPages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
11 rustPlatform.buildRustPackage rec {
15 src = fetchFromGitHub {
19 hash = "sha256-Y9SuxqI8wvoF0+X6CLNDlSFCwlSU8R73NYF/LjACP18=";
22 cargoHash = "sha256-1WJIIsTzbChWqvdBSR/OpLC1iR8FgLmypJFQEtpalbw=";
24 nativeBuildInputs = lib.optional (installManPages || installShellCompletions) installShellFiles;
26 buildNoDefaultFeatures = true;
27 buildFeatures = lib.optional withTcp "tcp";
29 postInstall = lib.optionalString installManPages ''
31 $out/bin/comodoro man $out/man
32 installManPage $out/man/*
33 '' + lib.optionalString installShellCompletions ''
34 installShellCompletion --cmd comodoro \
35 --bash <($out/bin/comodoro completion bash) \
36 --fish <($out/bin/comodoro completion fish) \
37 --zsh <($out/bin/comodoro completion zsh)
41 description = "CLI to manage your time";
42 homepage = "https://pimalaya.org/comodoro/";
43 changelog = "https://github.com/soywod/comodoro/blob/v${version}/CHANGELOG.md";
44 license = licenses.mit;
45 maintainers = with maintainers; [ soywod ];
46 mainProgram = "comodoro";