Skip to content

Commit

Permalink
postgresql{12,13}Packages.pg_safeupdate: 1.5 -> 1.4
Browse files Browse the repository at this point in the history
pg_safeupdate was updated to 1.5 in NixOS#269755. v1.5 is not compatible with
PostgreSQL 12 and 13 anymore, so those were marked as broken.

However, this blocks anyone using PostgreSQL 12 or 13 with pg_safeupdate
from updating nixpkgs.

Instead, the old version should have been kept for PG 12 and 13.
  • Loading branch information
wolfgangwalther committed Mar 31, 2024
1 parent 7a358ff commit 5e0eeb3
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,39 @@
{ lib, stdenv, fetchFromGitHub, postgresql }:

with {
"12" = {
version = "1.4";
sha256 = "sha256-1cyvVEC9MQGMr7Tg6EUbsVBrMc8ahdFS3+CmDkmAq4Y=";
};
"13" = {
version = "1.4";
sha256 = "sha256-1cyvVEC9MQGMr7Tg6EUbsVBrMc8ahdFS3+CmDkmAq4Y=";
};
"14" = {
version = "1.5";
sha256 = "sha256-RRSpkWLFuif+6RCncnsb1NnjKnIIRY9KgebKkjCN5cs=";
};
"15" = {
version = "1.5";
sha256 = "sha256-RRSpkWLFuif+6RCncnsb1NnjKnIIRY9KgebKkjCN5cs=";
};
"16" = {
version = "1.5";
sha256 = "sha256-RRSpkWLFuif+6RCncnsb1NnjKnIIRY9KgebKkjCN5cs=";
};
}."${lib.versions.major postgresql.version}" or (throw "pg_safeupdate: version specification for pg ${postgresql.version} missing.");

stdenv.mkDerivation rec {
pname = "pg-safeupdate";
version = "1.5";
inherit version;

buildInputs = [ postgresql ];

src = fetchFromGitHub {
owner = "eradman";
repo = pname;
rev = version;
sha256 = "sha256-RRSpkWLFuif+6RCncnsb1NnjKnIIRY9KgebKkjCN5cs=";
inherit sha256;
};

installPhase = ''
Expand All @@ -24,6 +47,5 @@ stdenv.mkDerivation rec {
platforms = postgresql.meta.platforms;
maintainers = with maintainers; [ wolfgangwalther ];
license = licenses.postgresql;
broken = versionOlder postgresql.version "14";
};
}

0 comments on commit 5e0eeb3

Please sign in to comment.