anchor.diff:      prettytable
       psutil
       psycopg2
  +    pysyncobj
       python-dateutil
       python-etcd
       pyyaml
  
positive.code: { lib, pythonPackages, fetchFromGitHub }:
  
  pythonPackages.buildPythonApplication rec {
    pname = "patroni";
    version = "1.6.5";
  
    src = fetchFromGitHub {
      owner = "zalando";
      repo = pname;
      rev = "v${version}";
      sha256 = "0iw0ra9fya4bf1vkjq3w5kij4x46yinb90v015pi9c6qfpancfdj";
    };
  
    # cdiff renamed to ydiff; remove when patroni source reflects this.
  
negative.code:     flake8
      mock
      pytestCheckHook
      pytest-cov
      requests
    ];
  
    # Fix tests by preventing them from writing to /homeless-shelter.
    preCheck = "export HOME=$(mktemp -d)";
  
    pythonImportsCheck = [ "patroni" ];
  
    meta = with lib; {
      homepage = "https://patroni.readthedocs.io/en/latest/";
  