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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

92 lines
1.8 KiB
Nix
Raw Normal View History

2022-09-30 22:01:13 +00:00
{ lib
, stdenv
, fetchFromGitHub
, glibcLocales
, installShellFiles
, python3
}:
2015-01-30 15:57:29 +00:00
2022-09-30 22:01:13 +00:00
python3.pkgs.buildPythonApplication rec {
2017-09-21 11:50:32 +00:00
pname = "khal";
2023-04-23 18:50:49 +00:00
version = "0.11.1";
2015-01-30 15:57:29 +00:00
2022-09-30 22:01:13 +00:00
src = fetchFromGitHub {
owner = "pimutils";
repo = pname;
rev = "v${version}";
2023-04-23 18:50:49 +00:00
hash = "sha256-5wBKo24EKdEUoYhhv1EqMPOjdwUS31d3R24kLdbyvPA=";
2015-01-30 15:57:29 +00:00
};
2022-09-30 22:01:13 +00:00
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
glibcLocales
installShellFiles
] ++ (with python3.pkgs; [
setuptools-scm
sphinx
sphinxcontrib_newsfeed
]);
propagatedBuildInputs = with python3.pkgs;[
2015-01-30 15:57:29 +00:00
atomicwrites
click
click-log
2015-01-30 15:57:29 +00:00
configobj
2022-09-30 22:01:13 +00:00
freezegun
2015-01-30 15:57:29 +00:00
icalendar
lxml
2022-09-30 22:01:13 +00:00
pkginfo
2015-01-30 15:57:29 +00:00
pkgs.vdirsyncer
2022-09-30 22:01:13 +00:00
python-dateutil
2015-01-30 15:57:29 +00:00
pytz
pyxdg
requests-toolbelt
2015-01-30 15:57:29 +00:00
tzlocal
urwid
2022-09-30 22:01:13 +00:00
];
nativeCheckInputs = with python3.pkgs;[
freezegun
2022-09-30 22:01:13 +00:00
hypothesis
packaging
pytestCheckHook
vdirsyncer
];
2018-09-04 10:27:19 +00:00
postInstall = ''
2022-07-02 09:45:33 +00:00
# shell completions
installShellCompletion --cmd khal \
--bash <(_KHAL_COMPLETE=bash_source $out/bin/khal) \
2022-09-03 09:56:49 +00:00
--zsh <(_KHAL_COMPLETE=zsh_source $out/bin/khal) \
--fish <(_KHAL_COMPLETE=fish_source $out/bin/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
2022-09-30 22:01:13 +00:00
installManPage doc/build/man/khal.1
2019-08-20 05:31:50 +00:00
2022-09-30 22:01:13 +00:00
# .desktop file
2019-08-20 05:31:50 +00:00
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;
2022-07-20 21:22:44 +00:00
LC_ALL = "en_US.UTF-8";
disabledTests = [
# timing based
"test_etag"
2022-12-27 17:53:30 +00:00
"test_bogota"
"test_event_no_dst"
2022-07-20 21:22:44 +00:00
];
meta = with lib; {
2015-01-30 15:57:29 +00:00
description = "CLI calendar application";
2022-09-30 22:01:13 +00:00
homepage = "http://lostpackets.de/khal/";
license = licenses.mit;
maintainers = with maintainers; [ gebner ];
2022-09-30 22:01:13 +00:00
broken = stdenv.isDarwin;
2015-01-30 15:57:29 +00:00
};
}