2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-30 09:33:41 +00:00
nixpkgs/pkgs/applications/misc/khal/default.nix

72 lines
1.7 KiB
Nix
Raw Normal View History

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