2020-01-06 19:28:46 +03:00
|
|
|
{ stdenv, pkgs, python3, fetchpatch, glibcLocales }:
|
2015-01-30 18:57:29 +03:00
|
|
|
|
2018-10-30 20:27:52 +03:00
|
|
|
with python3.pkgs; buildPythonApplication rec {
|
2017-09-21 14:50:32 +03:00
|
|
|
pname = "khal";
|
2019-03-30 20:58:32 +03:00
|
|
|
version = "0.10.1";
|
2015-01-30 18:57:29 +03:00
|
|
|
|
2017-09-21 14:50:32 +03:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-03-30 20:58:32 +03:00
|
|
|
sha256 = "1r8bkgjwkh7i8ygvsv51h1cnax50sb183vafg66x5snxf3dgjl6l";
|
2015-01-30 18:57:29 +03:00
|
|
|
};
|
|
|
|
|
2019-08-20 08:42:55 +03:00
|
|
|
# Include a khal.desktop file via upstream commit.
|
|
|
|
# This patch should be removed when updating to the next version, probably.
|
2020-01-06 19:28:46 +03:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "add-khal-dot-desktop.patch";
|
|
|
|
url = "https://github.com/pimutils/khal/commit/1f93d238fec7c934dd2f8e48f54925d22130e3aa.patch";
|
|
|
|
sha256 = "06skn3van7zd93348fc6axllx71ckkc7h2zljqlvwa339vca608c";
|
|
|
|
})
|
|
|
|
./skip-broken-test.patch
|
|
|
|
];
|
2019-08-20 08:42:55 +03:00
|
|
|
|
2016-05-22 19:34:14 +03:00
|
|
|
propagatedBuildInputs = [
|
2015-01-30 18:57:29 +03:00
|
|
|
atomicwrites
|
|
|
|
click
|
2019-03-26 03:14:30 +03:00
|
|
|
click-log
|
2015-01-30 18:57:29 +03:00
|
|
|
configobj
|
|
|
|
dateutil
|
|
|
|
icalendar
|
|
|
|
lxml
|
|
|
|
pkgs.vdirsyncer
|
|
|
|
pytz
|
|
|
|
pyxdg
|
|
|
|
requests_toolbelt
|
|
|
|
tzlocal
|
|
|
|
urwid
|
2015-07-21 20:00:03 +03:00
|
|
|
pkginfo
|
2016-05-22 19:34:14 +03:00
|
|
|
freezegun
|
2015-01-30 18:57:29 +03:00
|
|
|
];
|
2019-08-19 21:26:08 +03:00
|
|
|
nativeBuildInputs = [ setuptools_scm sphinx sphinxcontrib_newsfeed ];
|
2020-01-06 19:28:46 +03:00
|
|
|
checkInputs = [ pytest glibcLocales ];
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
2016-05-22 19:34:14 +03:00
|
|
|
|
2020-04-24 13:33:30 +03:00
|
|
|
postPatch = ''
|
|
|
|
sed -i \
|
|
|
|
-e "s/Invalid value for \"ics\"/Invalid value for \\\'ics\\\'/" \
|
|
|
|
-e "s/Invalid value for \"\[ICS\]\"/Invalid value for \\\'\[ICS\]\\\'/" \
|
|
|
|
tests/cli_test.py
|
|
|
|
'';
|
|
|
|
|
2018-09-04 13:27:19 +03:00
|
|
|
postInstall = ''
|
2019-08-19 21:26:08 +03:00
|
|
|
# zsh completion
|
2018-09-04 13:27:19 +03:00
|
|
|
install -D misc/__khal $out/share/zsh/site-functions/__khal
|
2019-08-19 21:26:08 +03:00
|
|
|
|
|
|
|
# man page
|
2019-10-23 20:07:53 +03:00
|
|
|
PATH="${python3.withPackages (ps: with ps; [ sphinx sphinxcontrib_newsfeed ])}/bin:$PATH" \
|
2019-08-19 21:26:08 +03:00
|
|
|
make -C doc man
|
|
|
|
install -Dm755 doc/build/man/khal.1 -t $out/share/man/man1
|
2019-08-20 08:31:50 +03:00
|
|
|
|
|
|
|
# desktop
|
|
|
|
install -Dm755 misc/khal.desktop -t $out/share/applications
|
2018-09-04 13:27:19 +03:00
|
|
|
'';
|
|
|
|
|
2019-03-31 20:08:46 +03:00
|
|
|
doCheck = !stdenv.isAarch64;
|
2018-10-30 20:27:52 +03:00
|
|
|
|
2016-05-22 19:34:14 +03:00
|
|
|
checkPhase = ''
|
2018-06-29 19:57:30 +03:00
|
|
|
py.test
|
2016-05-22 19:34:14 +03:00
|
|
|
'';
|
2015-01-30 18:57:29 +03:00
|
|
|
|
2015-05-30 02:26:29 +03:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "http://lostpackets.de/khal/";
|
2015-01-30 18:57:29 +03:00
|
|
|
description = "CLI calendar application";
|
2015-05-30 02:26:29 +03:00
|
|
|
license = licenses.mit;
|
2019-03-13 01:45:33 +03:00
|
|
|
maintainers = with maintainers; [ gebner ];
|
2015-01-30 18:57:29 +03:00
|
|
|
};
|
|
|
|
}
|