about summary refs log tree commit diff
path: root/pkgs/development/python-modules/taskw/default.nix
blob: 76cfe0faf0f439271f89af4dfb00add2906d5d3d (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
35
36
37
38
39
40
41
{ lib
, buildPythonPackage
, fetchPypi
, nose
, tox
, six
, python-dateutil
, kitchen
, pytestCheckHook
, pytz
, pkgs
}:

buildPythonPackage rec {
  pname = "taskw";
  version = "2.0.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-EQm9+b3nqbMqUAejAsh4MD/2UYi2QiWsdKMomkxUi90=";
  };

  patches = [ ./use-template-for-taskwarrior-install-path.patch ];
  postPatch = ''
    substituteInPlace taskw/warrior.py \
      --replace '@@taskwarrior@@' '${pkgs.taskwarrior}'
  '';

  buildInputs = [ pkgs.taskwarrior ];

  propagatedBuildInputs = [ six python-dateutil kitchen pytz ];

  nativeCheckInputs = [ pytestCheckHook ];

  meta = with lib; {
    homepage =  "https://github.com/ralphbean/taskw";
    description = "Python bindings for your taskwarrior database";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ pierron ];
  };
}