2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-06-15 15:56:04 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, icalendar
|
2020-04-24 23:36:52 +00:00
|
|
|
, lxml
|
2020-09-25 04:45:31 +00:00
|
|
|
, mock
|
2020-04-24 23:36:52 +00:00
|
|
|
, nose
|
2020-06-15 15:56:04 +00:00
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, tzlocal
|
|
|
|
, vobject
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "caldav";
|
2021-03-15 08:37:03 +00:00
|
|
|
version = "0.8.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-caldav";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-15 08:37:03 +00:00
|
|
|
sha256 = "11q3svns3a2ywfci739krxbh67cx691qja772wq22606blyygyjy";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = lib.optionals (pythonOlder "3.5") [ mock ];
|
2020-06-15 15:56:04 +00:00
|
|
|
propagatedBuildInputs = [ six requests vobject lxml ]
|
|
|
|
++ lib.optionals (pythonOlder "3.6") [ pytz tzlocal ];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
icalendar
|
|
|
|
nose
|
|
|
|
tzlocal
|
|
|
|
];
|
|
|
|
|
2021-03-15 08:37:03 +00:00
|
|
|
checkPhase = ''
|
|
|
|
nosetests tests
|
|
|
|
'';
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
# xandikos and radicale is only a optional test dependency, not available for python3
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2020-06-15 15:56:04 +00:00
|
|
|
--replace ", 'xandikos'" "" \
|
|
|
|
--replace ", 'radicale'" ""
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
pythonImportsCheck = [ "caldav" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "This project is a CalDAV (RFC4791) client library for Python.";
|
2021-03-15 08:37:03 +00:00
|
|
|
homepage = "https://github.com/python-caldav/caldav";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ marenz ];
|
2020-06-15 15:56:04 +00:00
|
|
|
#broken = true; # requires radicale which is not packaged yet
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|