nixpkgs/pkgs/servers/sql/patroni/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.1 KiB
Nix
Raw Normal View History

2021-02-03 09:13:48 +00:00
{ lib
, pythonPackages
, fetchFromGitHub
2022-08-08 12:25:30 +00:00
, nixosTests
2021-02-03 09:13:48 +00:00
}:
2020-02-17 05:54:18 +00:00
pythonPackages.buildPythonApplication rec {
pname = "patroni";
version = "3.3.0";
2020-02-17 05:54:18 +00:00
src = fetchFromGitHub {
owner = "zalando";
repo = pname;
rev = "v${version}";
sha256 = "sha256-gOjjE++hf3GOimvCxBR0jqqi3JNpbejLcWbLHpz2H4Q=";
2020-02-17 05:54:18 +00:00
};
propagatedBuildInputs = with pythonPackages; [
boto3
2020-02-17 05:54:18 +00:00
click
consul
dnspython
2020-02-17 05:54:18 +00:00
kazoo
kubernetes
prettytable
psutil
psycopg2
2021-02-03 09:13:48 +00:00
pysyncobj
2020-02-17 05:54:18 +00:00
python-dateutil
python-etcd
pyyaml
tzlocal
urllib3
ydiff
];
nativeCheckInputs = with pythonPackages; [
2020-02-17 05:54:18 +00:00
flake8
mock
2020-11-03 01:20:14 +00:00
pytestCheckHook
2021-02-03 09:13:48 +00:00
pytest-cov
2020-02-17 05:54:18 +00:00
requests
];
# Fix tests by preventing them from writing to /homeless-shelter.
preCheck = "export HOME=$(mktemp -d)";
2021-02-03 09:13:48 +00:00
pythonImportsCheck = [ "patroni" ];
2022-08-08 12:25:30 +00:00
passthru.tests = {
patroni = nixosTests.patroni;
};
2020-02-17 05:54:18 +00:00
meta = with lib; {
homepage = "https://patroni.readthedocs.io/en/latest/";
description = "Template for PostgreSQL HA with ZooKeeper, etcd or Consul";
2020-02-17 05:54:18 +00:00
license = licenses.mit;
2022-04-13 21:34:29 +00:00
platforms = platforms.unix;
maintainers = teams.deshaw.members;
2020-02-17 05:54:18 +00:00
};
}