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