Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / caldav / default.nix
blob15daa3b0697c5650f25dd7a960db92c313bfba98
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , icalendar
5 , lxml
6 , pytestCheckHook
7 , pythonOlder
8 , pytz
9 , recurring-ical-events
10 , requests
11 , tzlocal
12 , vobject
15 buildPythonPackage rec {
16   pname = "caldav";
17   version = "1.3.6";
19   format = "setuptools";
20   disabled = pythonOlder "3.7";
22   src = fetchFromGitHub {
23     owner = "python-caldav";
24     repo = pname;
25     rev = "refs/tags/v${version}";
26     hash = "sha256-N3pY3UYxOZgZbXqqsvASej12dOtdpyEHOL10btOKm/w=";
27   };
29   propagatedBuildInputs = [
30     vobject
31     lxml
32     requests
33     icalendar
34     recurring-ical-events
35     pytz
36     tzlocal
37   ];
39   nativeCheckInputs = [
40     pytestCheckHook
41   ];
43   # xandikos and radicale are only optional test dependencies, not available for python3
44   postPatch = ''
45     substituteInPlace setup.py \
46       --replace xandikos "" \
47       --replace radicale ""
48   '';
50   pythonImportsCheck = [ "caldav" ];
52   meta = with lib; {
53     description = "CalDAV (RFC4791) client library";
54     homepage = "https://github.com/python-caldav/caldav";
55     changelog = "https://github.com/python-caldav/caldav/releases/tag/v${version}";
56     license = licenses.asl20;
57     maintainers = with maintainers; [ marenz dotlambda ];
58   };