depot/third_party/nixpkgs/pkgs/servers/sql/patroni/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

61 lines
1.1 KiB
Nix

{ lib
, pythonPackages
, fetchFromGitHub
, nixosTests
}:
pythonPackages.buildPythonApplication rec {
pname = "patroni";
version = "3.3.0";
src = fetchFromGitHub {
owner = "zalando";
repo = pname;
rev = "v${version}";
sha256 = "sha256-gOjjE++hf3GOimvCxBR0jqqi3JNpbejLcWbLHpz2H4Q=";
};
propagatedBuildInputs = with pythonPackages; [
boto3
click
consul
dnspython
kazoo
kubernetes
prettytable
psutil
psycopg2
pysyncobj
python-dateutil
python-etcd
pyyaml
tzlocal
urllib3
ydiff
];
nativeCheckInputs = with pythonPackages; [
flake8
mock
pytestCheckHook
pytest-cov
requests
];
# Fix tests by preventing them from writing to /homeless-shelter.
preCheck = "export HOME=$(mktemp -d)";
pythonImportsCheck = [ "patroni" ];
passthru.tests = {
patroni = nixosTests.patroni;
};
meta = with lib; {
homepage = "https://patroni.readthedocs.io/en/latest/";
description = "A Template for PostgreSQL HA with ZooKeeper, etcd or Consul";
license = licenses.mit;
platforms = platforms.unix;
maintainers = teams.deshaw.members;
};
}