Files
nixpkgs/pkgs/by-name/co/comodoro/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

52 lines
1.5 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
installShellFiles,
installShellCompletions ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
installManPages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
withTcp ? true,
}:
rustPlatform.buildRustPackage rec {
pname = "comodoro";
version = "0.0.10";
src = fetchFromGitHub {
owner = "soywod";
repo = "comodoro";
rev = "v${version}";
hash = "sha256-Y9SuxqI8wvoF0+X6CLNDlSFCwlSU8R73NYF/LjACP18=";
};
cargoHash = "sha256-HzutYDphJdhNJ/jwyA5KVYr6fIutf73rYzKxrzVki9k=";
nativeBuildInputs = lib.optional (installManPages || installShellCompletions) installShellFiles;
buildNoDefaultFeatures = true;
buildFeatures = lib.optional withTcp "tcp";
postInstall =
lib.optionalString installManPages ''
mkdir -p $out/man
$out/bin/comodoro man $out/man
installManPage $out/man/*
''
+ lib.optionalString installShellCompletions ''
installShellCompletion --cmd comodoro \
--bash <($out/bin/comodoro completion bash) \
--fish <($out/bin/comodoro completion fish) \
--zsh <($out/bin/comodoro completion zsh)
'';
meta = {
description = "CLI to manage your time";
homepage = "https://github.com/pimalaya/comodoro";
changelog = "https://github.com/soywod/comodoro/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ soywod ];
mainProgram = "comodoro";
};
}