1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, icalendar
6, lxml
7, nose
8, pytz
9, requests
10, six
11, tzlocal
12, vobject
13}:
14
15buildPythonPackage rec {
16 pname = "caldav";
17 version = "0.9.1";
18
19 src = fetchFromGitHub {
20 owner = "python-caldav";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 hash = "sha256-Gil0v4pGyp5+TnYPjb8Vk0xTqnQKaeD8Ko/ZWhvkbUk=";
24 };
25
26 propagatedBuildInputs = [
27 vobject
28 lxml
29 requests
30 six
31 ];
32
33 checkInputs = [
34 icalendar
35 nose
36 tzlocal
37 pytz
38 ];
39
40 checkPhase = ''
41 nosetests tests
42 '';
43
44 # xandikos and radicale is only a optional test dependency, not available for python3
45 postPatch = ''
46 substituteInPlace setup.py \
47 --replace ", 'xandikos<0.2.4'" "" \
48 --replace ", 'radicale'" ""
49 '';
50
51 pythonImportsCheck = [ "caldav" ];
52
53 meta = with lib; {
54 description = "This project is a CalDAV (RFC4791) client library for Python.";
55 homepage = "https://github.com/python-caldav/caldav";
56 license = licenses.asl20;
57 maintainers = with maintainers; [ marenz dotlambda ];
58 };
59}