diff options
author | Souvik Sen <nixpkgs-commits@deshaw.com> | 2020-02-17 00:54:18 -0500 |
---|---|---|
committer | Souvik Sen <senso@deshaw.com> | 2020-02-25 02:27:12 -0500 |
commit | e6c42d3740077defd180abcc4e1e2a86ceca9b48 (patch) | |
tree | 0dc4b34581dea74c65cdb90d94a1634d04e3f4b6 /pkgs/servers | |
parent | 1fe82110febdf005d97b2927610ee854a38a8f26 (diff) | |
download | nixlib-e6c42d3740077defd180abcc4e1e2a86ceca9b48.tar nixlib-e6c42d3740077defd180abcc4e1e2a86ceca9b48.tar.gz nixlib-e6c42d3740077defd180abcc4e1e2a86ceca9b48.tar.bz2 nixlib-e6c42d3740077defd180abcc4e1e2a86ceca9b48.tar.lz nixlib-e6c42d3740077defd180abcc4e1e2a86ceca9b48.tar.xz nixlib-e6c42d3740077defd180abcc4e1e2a86ceca9b48.tar.zst nixlib-e6c42d3740077defd180abcc4e1e2a86ceca9b48.zip |
patroni: init at 1.6.4
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/sql/patroni/default.nix | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/servers/sql/patroni/default.nix b/pkgs/servers/sql/patroni/default.nix new file mode 100644 index 000000000000..a9fc3fd1a174 --- /dev/null +++ b/pkgs/servers/sql/patroni/default.nix @@ -0,0 +1,57 @@ +{ lib, pythonPackages, fetchFromGitHub }: + +pythonPackages.buildPythonApplication rec { + pname = "patroni"; + version = "1.6.4"; + + src = fetchFromGitHub { + owner = "zalando"; + repo = pname; + rev = "v${version}"; + sha256 = "0w0mz4a1cyxdsqmv7jrkw163jll8ir5zmf93zcidlqx13knrk80g"; + }; + + # cdiff renamed to ydiff; remove when patroni source reflects this. + postPatch = '' + for i in requirements.txt patroni/ctl.py tests/test_ctl.py; do + substituteInPlace $i --replace cdiff ydiff + done + ''; + + propagatedBuildInputs = with pythonPackages; [ + boto + click + consul + dns + kazoo + kubernetes + prettytable + psutil + psycopg2 + python-dateutil + python-etcd + pyyaml + tzlocal + urllib3 + ydiff + ]; + + checkInputs = with pythonPackages; [ + flake8 + mock + pytest + pytestcov + requests + ]; + + # Fix tests by preventing them from writing to /homeless-shelter. + preCheck = "export HOME=$(mktemp -d)"; + + 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.linux; + maintainers = [ maintainers.limeytexan ]; + }; +} |