3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix
danbst bd1fc9f9be postgresqlPackages: mark pg_auto_failover and pipelinedb broken for PG < 11
Marking packages broken isn't as fatal as throwing an exception. In my usecase,
I wanted to build all non-broken packages, that is:
```
nix-build -E 'with import ./.{}; with lib; flip filterAttrs postgresqlPackages (n: v: !v.meta.broken or false)'
```
2019-08-15 02:27:29 +03:00

32 lines
1 KiB
Nix

{ stdenv, fetchFromGitHub, postgresql, openssl, zlib, readline }:
stdenv.mkDerivation rec {
pname = "pg_auto_failover";
version = "1.0.3";
src = fetchFromGitHub {
owner = "citusdata";
repo = pname;
rev = "v${version}";
sha256 = "0mggf5h6gh2mck75dmz5w63gi7d10pqs58fdp2jdpv3am75picll";
};
buildInputs = [ postgresql openssl zlib readline ];
installPhase = ''
install -D -t $out/bin src/bin/pg_autoctl/pg_autoctl
install -D -t $out/lib src/monitor/pgautofailover.so
install -D -t $out/share/postgresql/extension src/monitor/*.sql
install -D -t $out/share/postgresql/extension src/monitor/pgautofailover.control
'';
meta = with stdenv.lib; {
description = "PostgreSQL extension and service for automated failover and high-availability";
homepage = "https://github.com/citusdata/pg_auto_failover";
maintainers = [ maintainers.marsam ];
platforms = postgresql.meta.platforms;
license = licenses.postgresql;
broken = versionOlder postgresql.version "10";
};
}