1{
2 lib,
3 arrow,
4 attrs,
5 buildPythonPackage,
6 fetchFromGitHub,
7 pytest-flakes,
8 pytestCheckHook,
9 pythonOlder,
10 setuptools,
11 tatsu,
12}:
13
14buildPythonPackage rec {
15 pname = "ics";
16 version = "0.7.2";
17 pyproject = true;
18
19 disabled = pythonOlder "3.6";
20
21 src = fetchFromGitHub {
22 owner = "ics-py";
23 repo = "ics-py";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-hdtnET7YfSb85+TGwpwzoxOfxPT7VSj9eKSiV6AXUS8=";
26 };
27
28 nativeBuildInputs = [ setuptools ];
29
30 propagatedBuildInputs = [
31 attrs
32 arrow
33 tatsu
34 ];
35
36 nativeCheckInputs = [
37 pytest-flakes
38 pytestCheckHook
39 ];
40
41 postPatch = ''
42 # 0.8 will move to python-dateutil
43 substituteInPlace requirements.txt \
44 --replace "arrow>=0.11,<0.15" "arrow"
45 substituteInPlace setup.cfg --replace "--pep8" ""
46 '';
47
48 disabledTests = [
49 # Failure seems to be related to arrow > 1.0
50 "test_event"
51 # Broke with TatSu 5.7:
52 "test_many_lines"
53 ];
54
55 pythonImportsCheck = [ "ics" ];
56
57 meta = with lib; {
58 description = "Pythonic and easy iCalendar library (RFC 5545)";
59 longDescription = ''
60 Ics.py is a pythonic and easy iCalendar library. Its goals are to read and
61 write ics data in a developer friendly way.
62 '';
63 homepage = "http://icspy.readthedocs.org/";
64 changelog = "https://github.com/ics-py/ics-py/releases/tag/v${version}";
65 license = licenses.asl20;
66 maintainers = with maintainers; [ ];
67 };
68}