anchor.diff:  { stdenv
  -, pythonAtLeast
   , buildPythonPackage
   , fetchPypi
   , isPy27
  -, fetchpatch
   , click
   , click-log
   , click-threading
  
positive.code: , requests
  , requests_oauthlib # required for google oauth sync
  , atomicwrites
  , milksnake
  , shippai
  , hypothesis
  , pytest
  , pytest-localserver
  , pytest-subtesthack
  , setuptools_scm
  }:
  
  # Packaging documentation at:
  # https://github.com/pimutils/vdirsyncer/blob/0.16.7/docs/packaging.rst
  buildPythonPackage rec {
    version = "0.16.7";
    pname = "vdirsyncer";
    disabled = isPy27;
  
    src = fetchPypi {
      inherit pname version;
      sha256 = "6c9bcfb9bcb01246c83ba6f8551cf54c58af3323210755485fc23bb7848512ef";
    };
  
    propagatedBuildInputs = [
  
negative.code: 
    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 ];
    };
  }
  