2022-10-06 18:32:54 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, glibcLocales
|
|
|
|
, installShellFiles
|
|
|
|
, python3
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "khal";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.11.3";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pimutils";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "khal";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-YP2kQ/qXPDwvFvlHf+A2Ymvk49dmt5tAnTaOhrOV92M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
glibcLocales
|
|
|
|
installShellFiles
|
2024-02-29 20:09:43 +00:00
|
|
|
] ++ (with python3.pkgs; [
|
2022-10-06 18:32:54 +00:00
|
|
|
setuptools-scm
|
|
|
|
sphinx
|
2023-11-16 04:20:00 +00:00
|
|
|
sphinxcontrib-newsfeed
|
2022-10-06 18:32:54 +00:00
|
|
|
]);
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs;[
|
2020-04-24 23:36:52 +00:00
|
|
|
atomicwrites
|
|
|
|
click
|
|
|
|
click-log
|
|
|
|
configobj
|
2022-10-06 18:32:54 +00:00
|
|
|
freezegun
|
2020-04-24 23:36:52 +00:00
|
|
|
icalendar
|
|
|
|
lxml
|
2022-10-06 18:32:54 +00:00
|
|
|
pkginfo
|
2023-07-15 17:15:38 +00:00
|
|
|
vdirsyncer
|
2022-10-06 18:32:54 +00:00
|
|
|
python-dateutil
|
2020-04-24 23:36:52 +00:00
|
|
|
pytz
|
|
|
|
pyxdg
|
2021-07-24 12:14:16 +00:00
|
|
|
requests-toolbelt
|
2020-04-24 23:36:52 +00:00
|
|
|
tzlocal
|
|
|
|
urwid
|
2022-10-06 18:32:54 +00:00
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs;[
|
2020-04-24 23:36:52 +00:00
|
|
|
freezegun
|
2022-10-06 18:32:54 +00:00
|
|
|
hypothesis
|
|
|
|
packaging
|
|
|
|
pytestCheckHook
|
|
|
|
vdirsyncer
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2022-07-14 12:49:19 +00:00
|
|
|
# shell completions
|
|
|
|
installShellCompletion --cmd khal \
|
|
|
|
--bash <(_KHAL_COMPLETE=bash_source $out/bin/khal) \
|
2022-09-09 14:08:57 +00:00
|
|
|
--zsh <(_KHAL_COMPLETE=zsh_source $out/bin/khal) \
|
|
|
|
--fish <(_KHAL_COMPLETE=fish_source $out/bin/khal)
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# man page
|
2023-11-16 04:20:00 +00:00
|
|
|
PATH="${python3.withPackages (ps: with ps; [ sphinx sphinxcontrib-newsfeed ])}/bin:$PATH" \
|
2020-04-24 23:36:52 +00:00
|
|
|
make -C doc man
|
2022-10-06 18:32:54 +00:00
|
|
|
installManPage doc/build/man/khal.1
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
# .desktop file
|
2020-04-24 23:36:52 +00:00
|
|
|
install -Dm755 misc/khal.desktop -t $out/share/applications
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = !stdenv.isAarch64;
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
LC_ALL = "en_US.UTF-8";
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# timing based
|
|
|
|
"test_etag"
|
2023-01-11 07:51:40 +00:00
|
|
|
"test_bogota"
|
|
|
|
"test_event_no_dst"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "CLI calendar application";
|
2022-10-06 18:32:54 +00:00
|
|
|
homepage = "http://lostpackets.de/khal/";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/pimutils/khal/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ gebner ];
|
|
|
|
};
|
|
|
|
}
|