1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 pytestCheckHook,
7 poetry-core,
8 pythonRelaxDepsHook,
9 datetime,
10 httplib2,
11 icalendar,
12 python-dateutil,
13 pytz,
14}:
15
16buildPythonPackage rec {
17 pname = "icalevents";
18 version = "0.1.27";
19 pyproject = true;
20
21 disabled = pythonOlder "3.9";
22
23 src = fetchFromGitHub {
24 owner = "jazzband";
25 repo = pname;
26 rev = "refs/tags/v${version}";
27 hash = "sha256-vSYQEJFBjXUF4WwEAtkLtcO3y/am00jGS+8Vj+JMMqQ=";
28 };
29
30 nativeBuildInputs = [
31 poetry-core
32 pythonRelaxDepsHook
33 ];
34
35 propagatedBuildInputs = [
36 datetime
37 httplib2
38 icalendar
39 python-dateutil
40 pytz
41 ];
42
43 pythonRelaxDeps = [
44 "datetime"
45 "httplib2"
46 "icalendar"
47 "pytz"
48 ];
49
50 nativeCheckInputs = [ pytestCheckHook ];
51
52 disabledTests = [
53 # Makes HTTP calls
54 "test_events_url"
55 "test_events_async_url"
56 ];
57
58 pythonImportsCheck = [ "icalevents" ];
59
60 meta = with lib; {
61 changelog = "https://github.com/jazzband/icalevents/releases/tag/v${version}";
62 description = "Python module for iCal URL/file parsing and querying";
63 homepage = "https://github.com/jazzband/icalevents";
64 maintainers = with maintainers; [ jamiemagee ];
65 license = licenses.mit;
66 };
67}