Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / office / watson / default.nix
blob4d5fd8542f2e891dcef4a346d2a63f1731815306
1 { lib, fetchFromGitHub, python3, installShellFiles, fetchpatch }:
3 with python3.pkgs;
5 buildPythonApplication rec {
6   pname = "watson";
7   version = "2.1.0";
9   src = fetchFromGitHub {
10     owner = "TailorDev";
11     repo = "Watson";
12     rev = version;
13     sha256 = "sha256-/AASYeMkt18KPJljAjNPRYOpg/T5xuM10LJq4LrFD0g=";
14   };
16   patches = [
17     # https://github.com/TailorDev/Watson/pull/473
18     (fetchpatch {
19       name = "fix-completion.patch";
20       url = "https://github.com/TailorDev/Watson/commit/43ad061a981eb401c161266f497e34df891a5038.patch";
21       sha256 = "sha256-v8/asP1wooHKjyy9XXB4Rtf6x+qmGDHpRoHEne/ZCxc=";
22     })
23   ];
25   postInstall = ''
26     installShellCompletion --bash --name watson watson.completion
27     installShellCompletion --zsh --name _watson watson.zsh-completion
28     installShellCompletion --fish watson.fish
29   '';
31   nativeCheckInputs = [ pytestCheckHook pytest-mock mock pytest-datafiles ];
32   propagatedBuildInputs = [ arrow click click-didyoumean requests ];
33   nativeBuildInputs = [ installShellFiles ];
35   meta = with lib; {
36     homepage = "https://tailordev.github.io/Watson/";
37     description = "A wonderful CLI to track your time!";
38     license = licenses.mit;
39     maintainers = with maintainers; [ mguentner nathyong oxzi ];
40   };