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
|
|
|
|
, 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-12-30 13:39:12 +00:00
|
|
|
version = "0.8.2";
|
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-12-30 13:39:12 +00:00
|
|
|
hash = "sha256-2mpE1aLipps4X/3EF0oKHXDcrgUh78/fxY6y1B1V2IU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
vobject
|
|
|
|
lxml
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
];
|
2020-06-15 15:56:04 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
icalendar
|
|
|
|
nose
|
|
|
|
tzlocal
|
2021-12-30 13:39:12 +00:00
|
|
|
pytz
|
2020-06-15 15:56:04 +00:00
|
|
|
];
|
|
|
|
|
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 \
|
2021-12-30 13:39:12 +00:00
|
|
|
--replace ", 'xandikos<0.2.4'" "" \
|
2020-06-15 15:56:04 +00:00
|
|
|
--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;
|
2021-12-30 13:39:12 +00:00
|
|
|
maintainers = with maintainers; [ marenz dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|