1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, backports-zoneinfo
6, python-dateutil
7, pytz
8, hypothesis
9, pytest
10}:
11
12buildPythonPackage rec {
13 version = "5.0.7";
14 pname = "icalendar";
15 format = "setuptools";
16
17 src = fetchFromGitHub {
18 owner = "collective";
19 repo = "icalendar";
20 rev = "refs/tags/v${version}";
21 hash = "sha256-fblcbyctnvd7DOc+tMWzg+90NHzZvH5xiY6BfJakQVo=";
22 };
23
24 propagatedBuildInputs = [
25 python-dateutil
26 pytz
27 ] ++ lib.optionals (pythonOlder "3.9") [
28 backports-zoneinfo
29 ];
30
31 nativeCheckInputs = [
32 hypothesis
33 pytest
34 ];
35
36 meta = with lib; {
37 changelog = "https://github.com/collective/icalendar/blob/v${version}/CHANGES.rst";
38 description = "A parser/generator of iCalendar files";
39 homepage = "https://github.com/collective/icalendar";
40 license = licenses.bsd2;
41 maintainers = with maintainers; [ olcai ];
42 };
43
44}