2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# native dependencies
|
|
|
|
, pkgs
|
|
|
|
|
|
|
|
# dependencies
|
2020-04-24 23:36:52 +00:00
|
|
|
, kitchen
|
2024-04-21 15:54:59 +00:00
|
|
|
, python-dateutil
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytz
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, pytest7CheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "taskw";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "2.0.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-EQm9+b3nqbMqUAejAsh4MD/2UYi2QiWsdKMomkxUi90=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
patches = [
|
|
|
|
./use-template-for-taskwarrior-install-path.patch
|
|
|
|
# Remove when https://github.com/ralphbean/taskw/pull/151 is merged.
|
|
|
|
./support-relative-path-in-taskrc.patch
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace taskw/warrior.py \
|
|
|
|
--replace '@@taskwarrior@@' '${pkgs.taskwarrior}'
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
buildInputs = [ pkgs.taskwarrior ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
|
|
|
kitchen
|
|
|
|
python-dateutil
|
|
|
|
pytz
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeCheckInputs = [ pytest7CheckHook ];
|
2022-11-21 17:40:18 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/ralphbean/taskw";
|
|
|
|
description = "Python bindings for your taskwarrior database";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ pierron ];
|
|
|
|
};
|
|
|
|
}
|