Merge pull request #307249 from fabaff/taskw-ng-fix
python312Packages.taskw-ng: refactor
This commit is contained in:
commit
fce4c5c1a1
1 changed files with 26 additions and 21 deletions
|
@ -1,13 +1,16 @@
|
||||||
{ lib
|
{
|
||||||
, buildPythonPackage
|
lib,
|
||||||
, fetchFromGitHub
|
buildPythonPackage,
|
||||||
, poetry-core
|
fetchFromGitHub,
|
||||||
, poetry-dynamic-versioning
|
kitchen,
|
||||||
, kitchen
|
packaging,
|
||||||
, packaging
|
poetry-core,
|
||||||
, python-dateutil
|
poetry-dynamic-versioning,
|
||||||
, pytz
|
python-dateutil,
|
||||||
, taskwarrior
|
pythonOlder,
|
||||||
|
pythonRelaxDepsHook,
|
||||||
|
pytz,
|
||||||
|
taskwarrior,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -15,23 +18,27 @@ buildPythonPackage rec {
|
||||||
version = "0.2.6";
|
version = "0.2.6";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bergercookie";
|
owner = "bergercookie";
|
||||||
repo = "taskw-ng";
|
repo = "taskw-ng";
|
||||||
rev = "v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-tlidTt0TzWnvfajYiIfvRv7OfakHY6zWAicmAwq/Z8w=";
|
hash = "sha256-tlidTt0TzWnvfajYiIfvRv7OfakHY6zWAicmAwq/Z8w=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
pythonRelaxDeps = [
|
||||||
substituteInPlace pyproject.toml \
|
"packaging"
|
||||||
--replace-fail 'pytz = "^2023.3.post1"' 'pytz = "*"'
|
"pytz"
|
||||||
'';
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
build-system = [
|
||||||
poetry-core
|
poetry-core
|
||||||
poetry-dynamic-versioning
|
poetry-dynamic-versioning
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
kitchen
|
kitchen
|
||||||
packaging
|
packaging
|
||||||
|
@ -39,18 +46,16 @@ buildPythonPackage rec {
|
||||||
pytz
|
pytz
|
||||||
];
|
];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [ taskwarrior ];
|
||||||
taskwarrior
|
|
||||||
];
|
|
||||||
|
|
||||||
# TODO: doesn't pass because `can_use` fails and `task --version` seems not to be answering.
|
# TODO: doesn't pass because `can_use` fails and `task --version` seems not to be answering.
|
||||||
# pythonImportsCheck = [ "taskw_ng" ];
|
# pythonImportsCheck = [ "taskw_ng" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "";
|
description = "Module to interact with the Taskwarrior API";
|
||||||
homepage = "https://github.com/bergercookie/taskw-ng";
|
homepage = "https://github.com/bergercookie/taskw-ng";
|
||||||
changelog = "https://github.com/bergercookie/taskw-ng/blob/${src.rev}/CHANGELOG.rst";
|
changelog = "https://github.com/bergercookie/taskw-ng/blob/${src.rev}/CHANGELOG.rst";
|
||||||
license = licenses.gpl3Only;
|
license = licenses.gpl3Plus;
|
||||||
maintainers = with maintainers; [ raitobezarius ];
|
maintainers = with maintainers; [ raitobezarius ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue