blob: 802113dd12ff2860e111443a50208164a8fe6506 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
{
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
installShellFiles,
installShellCompletions ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
installManPages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
withTcp ? true,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "comodoro";
version = "0.1.2";
src = fetchFromGitHub {
owner = "pimalaya";
repo = "comodoro";
rev = "v${finalAttrs.version}";
hash = "sha256-FnNNJ6WHR8KCsW+1hPIYddxQlUvpPc+SRbaxAcdVEUk=";
};
cargoHash = "sha256-2Drty/dj9HCG86rPt4RgexU83vKMnGFETbOT11Puy/0=";
nativeBuildInputs = lib.optional (installManPages || installShellCompletions) installShellFiles;
buildNoDefaultFeatures = true;
buildFeatures = [
"hook-command"
"hook-notify"
]
++ 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/pimalaya/comodoro/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ soywod ];
mainProgram = "comodoro";
};
})
|