Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2c347116b5b2
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5dfbc73c3bfa
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on May 24, 2019

  1. Copy the full SHA
    e3156c8 View commit details

Commits on May 31, 2019

  1. Merge pull request #62006 from marsam/init-postgresql-pg_auto_failover

    postgresqlPackages.pg_auto_failover: init at 1.0.2
    marsam authored May 31, 2019
    Copy the full SHA
    5dfbc73 View commit details
Showing with 35 additions and 0 deletions.
  1. +33 −0 pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix
  2. +2 −0 pkgs/servers/sql/postgresql/packages.nix
33 changes: 33 additions & 0 deletions pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ stdenv, fetchFromGitHub, postgresql, openssl }:

if stdenv.lib.versionOlder postgresql.version "10"
then throw "pg_auto_failover not supported for PostgreSQL ${postgresql.version}"
else
stdenv.mkDerivation rec {
pname = "pg_auto_failover";
version = "1.0.2";

src = fetchFromGitHub {
owner = "citusdata";
repo = pname;
rev = "v${version}";
sha256 = "1296zk143y9fvmcg2hjbrjdjfhi5rrd0clh16vblkghcvxrzfyvy";
};

buildInputs = [ postgresql openssl ];

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/extension src/monitor/*.sql
install -D -t $out/share/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;
};
}
2 changes: 2 additions & 0 deletions pkgs/servers/sql/postgresql/packages.nix
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@ self: super: {
};
};

pg_auto_failover = super.callPackage ./ext/pg_auto_failover.nix { };

pg_repack = super.callPackage ./ext/pg_repack.nix { };

pg_similarity = super.callPackage ./ext/pg_similarity.nix { };