2022-07-02 10:45:33 +01:00
|
|
|
{ lib, stdenv, pkgs, python3, fetchpatch, glibcLocales, installShellFiles }:
|
2015-01-30 15:57:29 +00:00
|
|
|
|
2018-10-30 17:27:52 +00:00
|
|
|
with python3.pkgs; buildPythonApplication rec {
|
2017-09-21 12:50:32 +01:00
|
|
|
pname = "khal";
|
2022-07-02 10:45:33 +01:00
|
|
|
version = "0.10.5";
|
2015-01-30 15:57:29 +00:00
|
|
|
|
2017-09-21 12:50:32 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-07-02 10:45:33 +01:00
|
|
|
sha256 = "sha256-Tu+3rDAqJthgbbOSgXWHpO2UwnoVvy6iEWFKRk/PDHY=";
|
2015-01-30 15:57:29 +00:00
|
|
|
};
|
|
|
|
|
2016-05-22 17:34:14 +01:00
|
|
|
propagatedBuildInputs = [
|
2015-01-30 15:57:29 +00:00
|
|
|
atomicwrites
|
|
|
|
click
|
2019-03-26 00:14:30 +00:00
|
|
|
click-log
|
2015-01-30 15:57:29 +00:00
|
|
|
configobj
|
2021-07-03 12:37:24 +01:00
|
|
|
python-dateutil
|
2015-01-30 15:57:29 +00:00
|
|
|
icalendar
|
|
|
|
lxml
|
|
|
|
pkgs.vdirsyncer
|
|
|
|
pytz
|
|
|
|
pyxdg
|
2021-07-20 22:21:18 +01:00
|
|
|
requests-toolbelt
|
2015-01-30 15:57:29 +00:00
|
|
|
tzlocal
|
|
|
|
urwid
|
2015-07-21 18:00:03 +01:00
|
|
|
pkginfo
|
2016-05-22 17:34:14 +01:00
|
|
|
freezegun
|
2015-01-30 15:57:29 +00:00
|
|
|
];
|
2022-07-02 10:45:33 +01:00
|
|
|
nativeBuildInputs = [ setuptools-scm sphinx sphinxcontrib_newsfeed installShellFiles ];
|
2021-07-02 07:34:26 +01:00
|
|
|
checkInputs = [
|
|
|
|
glibcLocales
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-01-06 16:28:46 +00:00
|
|
|
LC_ALL = "en_US.UTF-8";
|
2016-05-22 17:34:14 +01:00
|
|
|
|
2018-09-04 11:27:19 +01:00
|
|
|
postInstall = ''
|
2022-07-02 10:45:33 +01:00
|
|
|
# shell completions
|
|
|
|
installShellCompletion --cmd khal \
|
|
|
|
--bash <(_KHAL_COMPLETE=bash_source $out/bin/khal) \
|
|
|
|
--fish <(_KHAL_COMPLETE=zsh_source $out/bin/khal) \
|
|
|
|
--zsh <(_KHAL_COMPLETE=fish_source $out/bin/khal)
|
2019-08-19 19:26:08 +01:00
|
|
|
|
|
|
|
# man page
|
2019-10-23 18:07:53 +01:00
|
|
|
PATH="${python3.withPackages (ps: with ps; [ sphinx sphinxcontrib_newsfeed ])}/bin:$PATH" \
|
2019-08-19 19:26:08 +01:00
|
|
|
make -C doc man
|
|
|
|
install -Dm755 doc/build/man/khal.1 -t $out/share/man/man1
|
2019-08-20 06:31:50 +01:00
|
|
|
|
|
|
|
# desktop
|
|
|
|
install -Dm755 misc/khal.desktop -t $out/share/applications
|
2018-09-04 11:27:19 +01:00
|
|
|
'';
|
|
|
|
|
2019-03-31 18:08:46 +01:00
|
|
|
doCheck = !stdenv.isAarch64;
|
2018-10-30 17:27:52 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-05-28 14:28:44 +01:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://lostpackets.de/khal/";
|
2015-01-30 15:57:29 +00:00
|
|
|
description = "CLI calendar application";
|
2015-05-30 00:26:29 +01:00
|
|
|
license = licenses.mit;
|
2019-03-12 22:45:33 +00:00
|
|
|
maintainers = with maintainers; [ gebner ];
|
2015-01-30 15:57:29 +00:00
|
|
|
};
|
|
|
|
}
|