1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 click,
7 click-log,
8 click-threading,
9 requests-toolbelt,
10 requests,
11 atomicwrites,
12 hypothesis,
13 pytestCheckHook,
14 pytest-subtesthack,
15 setuptools,
16 setuptools-scm,
17 wheel,
18 aiostream,
19 aiohttp-oauthlib,
20 aiohttp,
21 pytest-asyncio,
22 trustme,
23 aioresponses,
24 vdirsyncer,
25 testers,
26}:
27
28buildPythonPackage rec {
29 pname = "vdirsyncer";
30 version = "0.19.3";
31 format = "pyproject";
32
33 disabled = pythonOlder "3.7";
34
35 src = fetchPypi {
36 inherit pname version;
37 hash = "sha256-5DeFH+uYXew1RGVPj5z23RCbCwP34ZlWCGYDCS/+so8=";
38 };
39
40 postPatch = ''
41 sed -i -e '/--cov/d' -e '/--no-cov/d' pyproject.toml
42 '';
43
44 nativeBuildInputs = [
45 setuptools
46 setuptools-scm
47 wheel
48 ];
49
50 pythonRelaxDeps = [ "aiostream" ];
51
52 propagatedBuildInputs = [
53 atomicwrites
54 click
55 click-log
56 click-threading
57 requests
58 requests-toolbelt
59 aiostream
60 aiohttp
61 aiohttp-oauthlib
62 ];
63
64 nativeCheckInputs = [
65 hypothesis
66 pytestCheckHook
67 pytest-subtesthack
68 pytest-asyncio
69 trustme
70 aioresponses
71 ];
72
73 preCheck = ''
74 export DETERMINISTIC_TESTS=true
75 '';
76
77 disabledTests = [
78 "test_create_collections" # Flaky test exceeds deadline on hydra: https://github.com/pimutils/vdirsyncer/issues/837
79 "test_request_ssl"
80 "test_verbosity"
81 ];
82
83 passthru.tests.version = testers.testVersion { package = vdirsyncer; };
84
85 meta = with lib; {
86 description = "Synchronize calendars and contacts";
87 homepage = "https://github.com/pimutils/vdirsyncer";
88 changelog = "https://github.com/pimutils/vdirsyncer/blob/v${version}/CHANGELOG.rst";
89 license = licenses.bsd3;
90 maintainers = [ ];
91 mainProgram = "vdirsyncer";
92 };
93}