2020-04-21 14:41:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-06-12 18:22:39 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, icalendar
|
2020-04-21 14:41:59 +00:00
|
|
|
, lxml
|
|
|
|
, nose
|
2020-06-12 18:22:39 +00:00
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, tzlocal
|
|
|
|
, vobject
|
2020-04-21 14:41:59 +00:00
|
|
|
}:
|
2019-04-29 08:49:35 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "caldav";
|
2020-06-06 06:47:00 +00:00
|
|
|
version = "0.7.0";
|
2019-04-29 08:49:35 +00:00
|
|
|
|
2020-06-12 18:22:39 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-caldav";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0m64maiqp3k8fsgkkvdx1dlfhkc70pqig4dclq6w8ajz82czrq83";
|
2019-04-29 08:49:35 +00:00
|
|
|
};
|
|
|
|
|
2020-06-12 18:22:39 +00:00
|
|
|
propagatedBuildInputs = [ six requests vobject lxml ]
|
|
|
|
++ lib.optionals (pythonOlder "3.6") [ pytz tzlocal ];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
icalendar
|
|
|
|
nose
|
|
|
|
tzlocal
|
|
|
|
];
|
|
|
|
|
|
|
|
# xandikos and radicale is only a optional test dependency, not available for python3
|
2020-04-21 14:41:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2020-06-12 18:22:39 +00:00
|
|
|
--replace ", 'xandikos'" "" \
|
|
|
|
--replace ", 'radicale'" ""
|
2020-04-21 14:41:59 +00:00
|
|
|
'';
|
|
|
|
|
2020-06-12 18:22:39 +00:00
|
|
|
pythonImportsCheck = [ "caldav" ];
|
|
|
|
|
2019-04-29 08:49:35 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "This project is a CalDAV (RFC4791) client library for Python.";
|
|
|
|
homepage = "https://pythonhosted.org/caldav/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ marenz ];
|
2020-06-12 18:22:39 +00:00
|
|
|
#broken = true; # requires radicale which is not packaged yet
|
2019-04-29 08:49:35 +00:00
|
|
|
};
|
|
|
|
}
|