postgresql.pkgs.pg_auto_failover: fix build on linux

This failed because libpam, which postgresql is now linked against, was missing as a
build input. In general, this is an indication that this extension needs the same
build inputs that postgresql was built with - so we just pass those instead.

This makes similar build failures less likely in the future.
This commit is contained in:
Wolfgang Walther 2024-03-08 23:30:43 +01:00
parent f58132cb15
commit 5a57e16d64
No known key found for this signature in database
GPG Key ID: B39893FA5F65CAE1

View File

@ -11,8 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-OIWykfFbVskrkPG/zSmZtZjc+W956KSfIzK7f5QOqpI=";
};
buildInputs = [ postgresql openssl zlib readline libkrb5 ]
++ lib.optionals (stdenv.isLinux && lib.versionOlder postgresql.version "13") [ libxcrypt ];
buildInputs = postgresql.buildInputs ++ [ postgresql ];
installPhase = ''
install -D -t $out/bin src/bin/pg_autoctl/pg_autoctl