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