2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, pkgs, python3, fetchpatch, glibcLocales }:
|
2015-01-30 16:57:29 +01:00
|
|
|
|
2018-10-30 18:27:52 +01:00
|
|
|
with python3.pkgs; buildPythonApplication rec {
|
2017-09-21 13:50:32 +02:00
|
|
|
pname = "khal";
|
2021-04-27 21:06:06 +02:00
|
|
|
version = "0.10.3";
|
2015-01-30 16:57:29 +01:00
|
|
|
|
2017-09-21 13:50:32 +02:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-27 21:06:06 +02:00
|
|
|
sha256 = "sha256-L92PwU/ll+Wn1unGPHho2WC07QIbVjxoSnHwcJDtpDI=";
|
2015-01-30 16:57:29 +01:00
|
|
|
};
|
|
|
|
|
2020-01-06 17:28:46 +01:00
|
|
|
patches = [
|
|
|
|
./skip-broken-test.patch
|
|
|
|
];
|
2019-08-20 07:42:55 +02:00
|
|
|
|
2016-05-22 18:34:14 +02:00
|
|
|
propagatedBuildInputs = [
|
2015-01-30 16:57:29 +01:00
|
|
|
atomicwrites
|
|
|
|
click
|
2019-03-26 01:14:30 +01:00
|
|
|
click-log
|
2015-01-30 16:57:29 +01:00
|
|
|
configobj
|
|
|
|
dateutil
|
|
|
|
icalendar
|
|
|
|
lxml
|
|
|
|
pkgs.vdirsyncer
|
|
|
|
pytz
|
|
|
|
pyxdg
|
|
|
|
requests_toolbelt
|
|
|
|
tzlocal
|
|
|
|
urwid
|
2015-07-21 19:00:03 +02:00
|
|
|
pkginfo
|
2016-05-22 18:34:14 +02:00
|
|
|
freezegun
|
2015-01-30 16:57:29 +01:00
|
|
|
];
|
2021-06-03 12:09:11 +02:00
|
|
|
nativeBuildInputs = [ setuptools-scm sphinx sphinxcontrib_newsfeed ];
|
2020-01-06 17:28:46 +01:00
|
|
|
checkInputs = [ pytest glibcLocales ];
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
2016-05-22 18:34:14 +02:00
|
|
|
|
2020-04-24 12:33:30 +02: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 12:27:19 +02:00
|
|
|
postInstall = ''
|
2019-08-19 20:26:08 +02:00
|
|
|
# zsh completion
|
2018-09-04 12:27:19 +02:00
|
|
|
install -D misc/__khal $out/share/zsh/site-functions/__khal
|
2019-08-19 20:26:08 +02:00
|
|
|
|
|
|
|
# man page
|
2019-10-23 19:07:53 +02:00
|
|
|
PATH="${python3.withPackages (ps: with ps; [ sphinx sphinxcontrib_newsfeed ])}/bin:$PATH" \
|
2019-08-19 20:26:08 +02:00
|
|
|
make -C doc man
|
|
|
|
install -Dm755 doc/build/man/khal.1 -t $out/share/man/man1
|
2019-08-20 07:31:50 +02:00
|
|
|
|
|
|
|
# desktop
|
|
|
|
install -Dm755 misc/khal.desktop -t $out/share/applications
|
2018-09-04 12:27:19 +02:00
|
|
|
'';
|
|
|
|
|
2019-03-31 19:08:46 +02:00
|
|
|
doCheck = !stdenv.isAarch64;
|
2018-10-30 18:27:52 +01:00
|
|
|
|
2016-05-22 18:34:14 +02:00
|
|
|
checkPhase = ''
|
2020-12-08 02:54:13 +01:00
|
|
|
py.test -k "not test_vertical_month_abbr_fr and not test_vertical_month_unicode_weekdeays_gr \
|
|
|
|
and not test_event_different_timezones and not test_default_calendar and not test_birthdays \
|
|
|
|
and not test_birthdays_no_year"
|
2016-05-22 18:34:14 +02:00
|
|
|
'';
|
2015-01-30 16:57:29 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://lostpackets.de/khal/";
|
2015-01-30 16:57:29 +01:00
|
|
|
description = "CLI calendar application";
|
2015-05-30 01:26:29 +02:00
|
|
|
license = licenses.mit;
|
2019-03-12 23:45:33 +01:00
|
|
|
maintainers = with maintainers; [ gebner ];
|
2015-01-30 16:57:29 +01:00
|
|
|
};
|
|
|
|
}
|