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";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "4.1.0";
|
2022-10-21 18:38:19 +00:00
|
|
|
format = "setuptools";
|
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}";
|
|
|
|
hash = "sha256-MItFZ+4Q7UKeIWHl8KFiWOLNgFcfb0h1YWjPd+g48Wg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-22 02:08:21 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace " --cov=todoman --cov-report=term-missing" ""
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --bash contrib/completion/bash/_todo
|
|
|
|
substituteInPlace contrib/completion/zsh/_todo --replace "jq " "${jq}/bin/jq "
|
|
|
|
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"
|
2022-06-16 17:23:12 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
"test_sorting_fields"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"todoman"
|
|
|
|
];
|
2020-04-24 23:36:52 +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/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.
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
changelog = "https://github.com/pimutils/todoman/raw/v${version}/CHANGELOG.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ leenaars ];
|
|
|
|
};
|
|
|
|
}
|