2022-10-21 18:38:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2020-11-06 00:33:48 +00:00
|
|
|
, glibcLocales
|
|
|
|
, installShellFiles
|
|
|
|
, jq
|
2022-10-21 18:38:19 +00:00
|
|
|
, python3
|
2020-11-06 00:33:48 +00:00
|
|
|
}:
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "todoman";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "4.4.0";
|
2023-08-22 20:05:09 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pimutils";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-5tQaNT6QVN9mxa9t6OvMux4ZGy4flUqszTAwet2QL0w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-04-22 02:08:21 +00:00
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
2022-10-21 18:38:19 +00:00
|
|
|
] ++ (with python3.pkgs; [
|
2021-04-22 02:08:21 +00:00
|
|
|
setuptools-scm
|
2022-10-21 18:38:19 +00:00
|
|
|
]);
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
atomicwrites
|
|
|
|
click
|
|
|
|
click-log
|
|
|
|
click-repl
|
|
|
|
humanize
|
|
|
|
icalendar
|
|
|
|
parsedatetime
|
|
|
|
python-dateutil
|
|
|
|
pyxdg
|
|
|
|
tabulate
|
|
|
|
urwid
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2020-11-06 00:33:48 +00:00
|
|
|
flake8
|
|
|
|
flake8-import-order
|
|
|
|
freezegun
|
|
|
|
hypothesis
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
2020-11-06 00:33:48 +00:00
|
|
|
glibcLocales
|
2023-08-22 20:05:09 +00:00
|
|
|
pytest-cov
|
2020-11-06 00:33:48 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --bash contrib/completion/bash/_todo
|
2023-11-16 04:20:00 +00:00
|
|
|
substituteInPlace contrib/completion/zsh/_todo --replace "jq " "${lib.getExe jq} "
|
2020-04-24 23:36:52 +00:00
|
|
|
installShellCompletion --zsh contrib/completion/zsh/_todo
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Testing of the CLI part and output
|
|
|
|
"test_color_due_dates"
|
|
|
|
"test_color_flag"
|
|
|
|
"test_default_command"
|
|
|
|
"test_main"
|
|
|
|
"test_missing_cache_dir"
|
|
|
|
"test_sorting_null_values"
|
|
|
|
"test_xdg_existant"
|
2022-10-21 18:38:19 +00:00
|
|
|
# Tests are sensitive to performance
|
|
|
|
"test_sorting_fields"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"todoman"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/pimutils/todoman";
|
|
|
|
description = "Standards-based task manager based on iCalendar";
|
|
|
|
longDescription = ''
|
2022-10-21 18:38:19 +00:00
|
|
|
Todoman is a simple, standards-based, cli todo (aka task) manager. Todos
|
|
|
|
are stored into iCalendar files, which means you can sync them via CalDAV
|
2020-04-24 23:36:52 +00:00
|
|
|
using, for example, vdirsyncer.
|
|
|
|
|
|
|
|
Todos are read from individual ics files from the configured directory.
|
2022-10-21 18:38:19 +00:00
|
|
|
This matches the vdir specification. There is support for the most common TODO
|
2020-04-24 23:36:52 +00:00
|
|
|
features for now (summary, description, location, due date and priority) for
|
2022-10-21 18:38:19 +00:00
|
|
|
now.
|
2020-04-24 23:36:52 +00:00
|
|
|
Unsupported fields may not be shown but are never deleted or altered.
|
|
|
|
'';
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://todoman.readthedocs.io/en/stable/changelog.html#v${builtins.replaceStrings ["."] ["-"] version}";
|
|
|
|
license = lib.licenses.isc;
|
|
|
|
maintainers = with lib.maintainers; [ leenaars antonmosich ];
|
2023-08-22 20:05:09 +00:00
|
|
|
mainProgram = "todo";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|