2022-07-14 12:49:19 +00:00
|
|
|
{ lib, stdenv, pkgs, python3, fetchpatch, glibcLocales, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
with python3.pkgs; buildPythonApplication rec {
|
|
|
|
pname = "khal";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "0.10.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-07-14 12:49:19 +00:00
|
|
|
sha256 = "sha256-Tu+3rDAqJthgbbOSgXWHpO2UwnoVvy6iEWFKRk/PDHY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
atomicwrites
|
|
|
|
click
|
|
|
|
click-log
|
|
|
|
configobj
|
2021-07-04 02:40:35 +00:00
|
|
|
python-dateutil
|
2020-04-24 23:36:52 +00:00
|
|
|
icalendar
|
|
|
|
lxml
|
|
|
|
pkgs.vdirsyncer
|
|
|
|
pytz
|
|
|
|
pyxdg
|
2021-07-24 12:14:16 +00:00
|
|
|
requests-toolbelt
|
2020-04-24 23:36:52 +00:00
|
|
|
tzlocal
|
|
|
|
urwid
|
|
|
|
pkginfo
|
|
|
|
freezegun
|
|
|
|
];
|
2022-07-14 12:49:19 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm sphinx sphinxcontrib_newsfeed installShellFiles ];
|
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
|
|
|
|
PATH="${python3.withPackages (ps: with ps; [ sphinx sphinxcontrib_newsfeed ])}/bin:$PATH" \
|
|
|
|
make -C doc man
|
|
|
|
install -Dm755 doc/build/man/khal.1 -t $out/share/man/man1
|
|
|
|
|
|
|
|
# desktop
|
|
|
|
install -Dm755 misc/khal.desktop -t $out/share/applications
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = !stdenv.isAarch64;
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
checkInputs = [
|
|
|
|
glibcLocales
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# timing based
|
|
|
|
"test_etag"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://lostpackets.de/khal/";
|
|
|
|
description = "CLI calendar application";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ gebner ];
|
|
|
|
};
|
|
|
|
}
|