aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/vdirsyncer/stable.nix
blob: 6e1dc98256702c7dfe99eaf5334e42b1df32fd1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{ stdenv
, buildPythonPackage
, fetchPypi
, isPy27
, click
, click-log
, click-threading
, requests_toolbelt
, requests
, requests_oauthlib # required for google oauth sync
, atomicwrites
, hypothesis
, pytestCheckHook
, pytest-localserver
, pytest-subtesthack
, setuptools_scm
}:

buildPythonPackage rec {
  version = "0.16.8";
  pname = "vdirsyncer";
  disabled = isPy27;

  src = fetchPypi {
    inherit pname version;
    sha256 = "bfdb422f52e1d4d60bd0635d203fb59fa7f613397d079661eb48e79464ba13c5";
  };

  propagatedBuildInputs = [
    click click-log click-threading
    requests_toolbelt
    requests
    requests_oauthlib # required for google oauth sync
    atomicwrites
  ];

  nativeBuildInputs = [
    setuptools_scm
  ];

  checkInputs = [
    hypothesis
    pytestCheckHook
    pytest-localserver
    pytest-subtesthack
  ];

  postPatch = ''
    substituteInPlace setup.py --replace "click>=5.0,<6.0" "click"
  '';

  preCheck = ''
    export DETERMINISTIC_TESTS=true
  '';

  disabledTests = [ "test_verbosity" ];

  meta = with stdenv.lib; {
    homepage = "https://github.com/pimutils/vdirsyncer";
    description = "Synchronize calendars and contacts";
    license = licenses.mit;
    maintainers = with maintainers; [ loewenheim ];
  };
}