nixpkgs/pkgs/applications/misc/khal/default.nix

66 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv, pkgs, python3, fetchpatch }:
2015-01-30 15:57:29 +00:00
with python3.pkgs; buildPythonApplication rec {
2017-09-21 11:50:32 +00:00
pname = "khal";
2019-03-30 17:58:32 +00:00
version = "0.10.1";
2015-01-30 15:57:29 +00:00
2017-09-21 11:50:32 +00:00
src = fetchPypi {
inherit pname version;
2019-03-30 17:58:32 +00:00
sha256 = "1r8bkgjwkh7i8ygvsv51h1cnax50sb183vafg66x5snxf3dgjl6l";
2015-01-30 15:57:29 +00:00
};
# Include a khal.desktop file via upstream commit.
# This patch should be removed when updating to the next version, probably.
patches = [ (fetchpatch {
name = "add-khal-dot-desktop.patch";
url = "https://github.com/pimutils/khal/commit/1f93d238fec7c934dd2f8e48f54925d22130e3aa.patch";
sha256 = "06skn3van7zd93348fc6axllx71ckkc7h2zljqlvwa339vca608c";
}) ];
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
];
2019-08-19 18:26:08 +00:00
nativeBuildInputs = [ setuptools_scm sphinx sphinxcontrib_newsfeed ];
2018-06-29 16:57:30 +00:00
checkInputs = [ pytest ];
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 = ''
2018-06-29 16:57:30 +00:00
py.test
'';
2015-01-30 15:57:29 +00:00
meta = with stdenv.lib; {
2015-01-30 15:57:29 +00:00
homepage = http://lostpackets.de/khal/;
description = "CLI calendar application";
license = licenses.mit;
maintainers = with maintainers; [ gebner ];
2015-01-30 15:57:29 +00:00
};
}