2022-06-06 12:58:15 +00:00
|
|
|
{ lib, fetchFromGitHub, python3, installShellFiles, fetchpatch }:
|
2017-12-31 13:13:21 +00:00
|
|
|
|
2022-05-19 19:32:34 +00:00
|
|
|
with python3.pkgs;
|
2021-07-09 12:41:03 +00:00
|
|
|
|
2022-05-19 19:32:34 +00:00
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "watson";
|
|
|
|
version = "2.1.0";
|
2017-05-04 16:11:36 +00:00
|
|
|
|
2020-06-07 19:08:38 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TailorDev";
|
|
|
|
repo = "Watson";
|
|
|
|
rev = version;
|
2022-05-19 19:32:34 +00:00
|
|
|
sha256 = "sha256-/AASYeMkt18KPJljAjNPRYOpg/T5xuM10LJq4LrFD0g=";
|
2017-05-04 16:11:36 +00:00
|
|
|
};
|
|
|
|
|
2022-06-06 12:58:15 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/TailorDev/Watson/pull/473
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-completion.patch";
|
|
|
|
url = "https://github.com/TailorDev/Watson/commit/43ad061a981eb401c161266f497e34df891a5038.patch";
|
|
|
|
sha256 = "sha256-v8/asP1wooHKjyy9XXB4Rtf6x+qmGDHpRoHEne/ZCxc=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-28 06:46:48 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --bash --name watson watson.completion
|
|
|
|
installShellCompletion --zsh --name _watson watson.zsh-completion
|
2021-09-24 17:24:54 +00:00
|
|
|
installShellCompletion --fish watson.fish
|
2020-04-28 06:46:48 +00:00
|
|
|
'';
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook pytest-mock mock pytest-datafiles ];
|
2021-09-12 17:29:38 +00:00
|
|
|
propagatedBuildInputs = [ arrow click click-didyoumean requests ];
|
2020-04-28 06:46:48 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2017-05-04 16:11:36 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://tailordev.github.io/Watson/";
|
2017-05-04 16:11:36 +00:00
|
|
|
description = "A wonderful CLI to track your time!";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "watson";
|
2017-05-04 16:11:36 +00:00
|
|
|
license = licenses.mit;
|
2020-08-15 13:25:59 +00:00
|
|
|
maintainers = with maintainers; [ mguentner nathyong oxzi ];
|
2017-05-04 16:11:36 +00:00
|
|
|
};
|
2017-12-31 13:13:21 +00:00
|
|
|
}
|