pg-dump-anon: use latest postgresql available

While reviewing  I noticed that the pg_anonymizer test fails for
postgresql 17. The reason for that is that `pkgs.postgresql` is v16 and
using its psql to connect against a v17 database doesn't work.

I decided that we'll just use the latest available package in here. I
don't want to introduce another attribute (`postgresql_latest`), if
there are too many instances of that we're blocked on adding new
postgresql majors directly to master again which is the current status
quo. With the test rework in  it's also way easier to catch this.
This commit is contained in:
Maximilian Bosch 2024-11-08 16:55:18 +01:00
parent 50f7983ec7
commit 0418996c96
No known key found for this signature in database

View File

@ -1,4 +1,4 @@
{ lib, fetchFromGitLab, buildGoModule, nixosTests, postgresql, makeWrapper }:
{ lib, fetchFromGitLab, buildGoModule, nixosTests, postgresql_17, makeWrapper }:
buildGoModule rec {
pname = "pg-dump-anon";
@ -19,7 +19,7 @@ buildGoModule rec {
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/pg_dump_anon \
--prefix PATH : ${lib.makeBinPath [ postgresql ]}
--prefix PATH : ${lib.makeBinPath [ postgresql_17 ]}
'';
meta = with lib; {