1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, backports-zoneinfo
6, python-dateutil
7, pytz
8, hypothesis
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 version = "5.0.10";
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-sRsUjNClJ58kmCRiwSe7oq20eamj95Vwy/o0xPU8qPw=";
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 pytestCheckHook
34 ];
35
36 pytestFlagsArray = [ "src/icalendar" ];
37
38 meta = with lib; {
39 changelog = "https://github.com/collective/icalendar/blob/v${version}/CHANGES.rst";
40 description = "A parser/generator of iCalendar files";
41 homepage = "https://github.com/collective/icalendar";
42 license = licenses.bsd2;
43 maintainers = with maintainers; [ olcai ];
44 };
45
46}