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