about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/office/watson/default.nix
blob: 52c94ce378e1f6ca8f721e50f5f92cc3fd43c78e (plain) (blame)
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
{ stdenv, pythonPackages, fetchpatch, installShellFiles }:

with pythonPackages;

buildPythonApplication rec {
  pname = "watson";
  version = "1.8.0";

  src = fetchPypi {
    inherit version;
    pname = "td-watson";
    sha256 = "1ip66jhbcqifdw1avbhngwym0vv7fsqxgbph11da5wlqwfwp060n";
  };

  checkPhase = ''
    pytest -vs tests
  '';

  postInstall = ''
    installShellCompletion --bash --name watson watson.completion
    installShellCompletion --zsh --name _watson watson.zsh-completion
  '';

  checkInputs = [ py pytest pytest-datafiles mock pytest-mock pytestrunner ];
  propagatedBuildInputs = [ requests click arrow ];
  nativeBuildInputs = [ installShellFiles ];

  meta = with stdenv.lib; {
    homepage = "https://tailordev.github.io/Watson/";
    description = "A wonderful CLI to track your time!";
    license = licenses.mit;
    maintainers = with maintainers; [ mguentner nathyong ];
  };
}