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