1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5
6 # build-system
7 setuptools,
8
9 # native dependencies
10 pkgs,
11
12 # dependencies
13 kitchen,
14 python-dateutil,
15 pytz,
16
17 # tests
18 pytest7CheckHook,
19}:
20
21buildPythonPackage rec {
22 pname = "taskw";
23 version = "2.0.0";
24 pyproject = true;
25
26 src = fetchPypi {
27 inherit pname version;
28 hash = "sha256-EQm9+b3nqbMqUAejAsh4MD/2UYi2QiWsdKMomkxUi90=";
29 };
30
31 patches = [
32 ./use-template-for-taskwarrior-install-path.patch
33 # Remove when https://github.com/ralphbean/taskw/pull/151 is merged.
34 ./support-relative-path-in-taskrc.patch
35 ];
36 postPatch = ''
37 substituteInPlace taskw/warrior.py \
38 --replace '@@taskwarrior@@' '${pkgs.taskwarrior}'
39 '';
40
41 build-system = [ setuptools ];
42
43 buildInputs = [ pkgs.taskwarrior ];
44
45 dependencies = [
46 kitchen
47 python-dateutil
48 pytz
49 ];
50
51 nativeCheckInputs = [ pytest7CheckHook ];
52
53 meta = with lib; {
54 homepage = "https://github.com/ralphbean/taskw";
55 description = "Python bindings for your taskwarrior database";
56 license = licenses.gpl3Plus;
57 maintainers = with maintainers; [ pierron ];
58 };
59}