Skip to content

Commit

Permalink
Merge: postgresql_17: init at 17.0 (#351253)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ma27 authored Oct 27, 2024
2 parents d36c40c + 29225a3 commit e34f2c0
Show file tree
Hide file tree
Showing 26 changed files with 108 additions and 40 deletions.
6 changes: 6 additions & 0 deletions pkgs/servers/sql/postgresql/17.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import ./generic.nix {
version = "17.0";
hash = "sha256-fidhMcD91rYliNutmzuyS4w0mNUAkyjbpZrxboGRCd4=";
# TODO: Add dont-use-locale-a-on-musl.patch once Alpine Linux has PostgreSQL 17.
# MR in: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/72853
}
1 change: 1 addition & 0 deletions pkgs/servers/sql/postgresql/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ let
postgresql_14 = ./14.nix;
postgresql_15 = ./15.nix;
postgresql_16 = ./16.nix;
postgresql_17 = ./17.nix;
};

mkAttributes = jitSupport:
Expand Down
2 changes: 2 additions & 0 deletions pkgs/servers/sql/postgresql/ext/age.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

let
hashes = {
# Issue tracking PostgreSQL 17 support: https://github.com/apache/age/issues/2111
# "17" = "";
"16" = "sha256-sXh/vmGyYj00ALfFVdeql2DZ6nCJQDNKyNgzlOZnPAw=";
"15" = "sha256-webZWgWZGnSoXwTpk816tjbtHV1UIlXkogpBDAEL4gM=";
"14" = "sha256-jZXhcYBubpjIJ8M5JHXKV5f6VK/2BkypH3P7nLxZz3E=";
Expand Down
5 changes: 4 additions & 1 deletion pkgs/servers/sql/postgresql/ext/citus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ stdenv.mkDerivation rec {
# "Our soft policy for Postgres version compatibility is to support Citus'
# latest release with Postgres' 3 latest releases."
# https://www.citusdata.com/updates/v12-0/#deprecated_features
broken = versionOlder postgresql.version "14";
broken = versionOlder postgresql.version "14" ||
# PostgreSQL 17 support issue upstream: https://github.com/citusdata/citus/issues/7708
# Check after next package update.
(versionAtLeast postgresql.version "17" && version == "12.1.2");
description = "Distributed PostgreSQL as an extension";
homepage = "https://www.citusdata.com/";
changelog = "https://github.com/citusdata/citus/blob/${src.rev}/CHANGELOG.md";
Expand Down
11 changes: 9 additions & 2 deletions pkgs/servers/sql/postgresql/ext/lantern.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,33 @@
, stdenv
, cmake
, fetchFromGitHub
, openssl
, postgresql
, postgresqlTestHook
}:

stdenv.mkDerivation (finalAttrs: {
pname = "postgresql-lantern";
version = "0.2.4";
version = "0.4.1";

src = fetchFromGitHub {
owner = "lanterndata";
repo = "lantern";
rev = "v${finalAttrs.version}";
hash = "sha256-d5CdS11Z0u8+oPvjH6gVx6k8y05SS6wU3PnafcEgQeY=";
hash = "sha256-V8W61hELXeaVvNZgRUcckFlCMWis7NENlRKySxsK/L8=";
fetchSubmodules = true;
};

postPatch = ''
patchShebangs --build lantern_hnsw/scripts/link_llvm_objects.sh
'';

nativeBuildInputs = [
cmake
];

buildInputs = [
openssl
postgresql
];

Expand All @@ -38,6 +44,7 @@ stdenv.mkDerivation (finalAttrs: {

cmakeFlags = [
"-DBUILD_FOR_DISTRIBUTING=ON"
"-S ../lantern_hnsw"
];

passthru.tests.extension = stdenv.mkDerivation {
Expand Down
3 changes: 3 additions & 0 deletions pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ stdenv.mkDerivation rec {
maintainers = [ ];
platforms = postgresql.meta.platforms;
license = licenses.postgresql;
# PostgreSQL 17 support issue upstream: https://github.com/hapostgres/pg_auto_failover/issues/1048
# Check after next package update.
broken = versionAtLeast postgresql.version "17" && version == "2.1";
};
}
6 changes: 3 additions & 3 deletions pkgs/servers/sql/postgresql/ext/pg_cron.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

stdenv.mkDerivation rec {
pname = "pg_cron";
version = "1.6.2";
version = "1.6.4";

buildInputs = [ postgresql ];

src = fetchFromGitHub {
owner = "citusdata";
repo = pname;
rev = "v${version}";
hash = "sha256-/dD1gX0+RRsBFIjSV9TVk+ppPw0Jrzssl+rRZ2qAp4w=";
hash = "sha256-t1DpFkPiSfdoGG2NgNT7g1lkvSooZoRoUrix6cBID40=";
};

installPhase = ''
Expand All @@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Run Cron jobs through PostgreSQL";
homepage = "https://github.com/citusdata/pg_cron";
changelog = "https://github.com/citusdata/pg_cron/raw/v${version}/CHANGELOG.md";
changelog = "https://github.com/citusdata/pg_cron/releases/tag/v${version}";
maintainers = with maintainers; [ thoughtpolice ];
platforms = postgresql.meta.platforms;
license = licenses.postgresql;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/servers/sql/postgresql/ext/pg_ed25519.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ stdenv.mkDerivation rec {
maintainers = [ maintainers.renzo ];
platforms = postgresql.meta.platforms;
license = licenses.mit;
# Broken on darwin and linux (JIT) with no upstream fix available.
broken = lib.versionAtLeast postgresql.version "16" && stdenv.cc.isClang;
};
}

4 changes: 4 additions & 0 deletions pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

let
source = {
"17" = {
version = "1.7.0";
hash = "sha256-MNQMePDmGxC8OFIJuVJrhfgU566vkng00+tjeGpGKvs=";
};
"16" = {
version = "1.6.0";
hash = "sha256-lg7N0QblluTgtNo1tGZjirNJSyQXtcAEs9Jqd3zx0Sg=";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/servers/sql/postgresql/ext/pg_ivm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

stdenv.mkDerivation rec {
pname = "pg_ivm";
version = "1.8";
version = "1.9";

src = fetchFromGitHub {
owner = "sraoss";
repo = pname;
rev = "v${version}";
hash = "sha256-HncWX3jx9sEvxGGMMZ9QT4tDQ4JYbkNrFw2aZHgCVE8=";
hash = "sha256-Qcie7sbXcMbQkMoFIYBfttmvlYooESdSk2DyebHKPlk=";
};

buildInputs = [ postgresql ];
Expand Down
4 changes: 4 additions & 0 deletions pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ with {
version = "1.5";
sha256 = "sha256-RRSpkWLFuif+6RCncnsb1NnjKnIIRY9KgebKkjCN5cs=";
};
"17" = {
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 {
Expand Down
24 changes: 18 additions & 6 deletions pkgs/servers/sql/postgresql/ext/pg_similarity.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
{ stdenv, lib, fetchFromGitHub, gcc, postgresql }:
{ stdenv, lib, fetchFromGitHub, fetchpatch, postgresql, unstableGitUpdater }:

stdenv.mkDerivation {

pname = "pg_similarity";
version = "1.0";
version = "1.0-unstable-2021-01-12";

src = fetchFromGitHub {
owner = "eulerto";
repo = "pg_similarity";
rev = "be1a8b08c8716e59b89982557da9ea68cdf868c5";
sha256 = "1z4v4r2yccdr8kz3935fnk1bc5vj0qj0apscldyap4wxlyi89xim";
rev = "b9cb0a2d501b91e33cd1ef550b05483ca3563f71";
sha256 = "sha256-L04ANvyfzHgW7fINeJEY6T77Vojq3SI8P1TWiCRSPs0=";
};

buildInputs = [ postgresql gcc ];
patches = [
(fetchpatch {
# https://github.com/eulerto/pg_similarity/pull/43
# Also applied in debian as https://sources.debian.org/data/main/p/pg-similarity/1.0-8/debian/patches/pg16
name = "pg16.patch";
url = "https://github.com/eulerto/pg_similarity/commit/f7781ea5ace80f697a8249e03e3ce47d4b0f6b2f.patch";
hash = "sha256-MPDvWfNzSg28lXL5u5/Un9pOCJjqJ4Fz9b8XCfalgts=";
})
];

buildInputs = [ postgresql ];

makeFlags = [ "USE_PGXS=1" ];

Expand All @@ -20,6 +30,8 @@ stdenv.mkDerivation {
install -D ./{pg_similarity--unpackaged--1.0.sql,pg_similarity--1.0.sql,pg_similarity.control} -t $out/share/postgresql/extension
'';

passthru.updateScript = unstableGitUpdater {};

meta = {
description = "Extension to support similarity queries on PostgreSQL";
longDescription = ''
Expand Down
4 changes: 2 additions & 2 deletions pkgs/servers/sql/postgresql/ext/pg_squeeze.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

stdenv.mkDerivation (finalAttrs: {
pname = "pg_squeeze";
version = "1.6.2";
version = "1.7.0";

src = fetchFromGitHub {
owner = "cybertec-postgresql";
repo = "pg_squeeze";
rev = "REL${builtins.replaceStrings ["."] ["_"] finalAttrs.version}";
hash = "sha256-YS13iIpQ4NJe0N6bRVa2RDxEMwEzBc2mjNYM5/Vqjn8=";
hash = "sha256-Kh1wSOvV5Rd1CG/na3yzbWzvaR8SJ6wmTZOnM+lbgik=";
};

buildInputs = [
Expand Down
4 changes: 2 additions & 2 deletions pkgs/servers/sql/postgresql/ext/pg_topn.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

stdenv.mkDerivation rec {
pname = "pg_topn";
version = "2.6.0";
version = "2.7.0";

buildInputs = [ postgresql ];

src = fetchFromGitHub {
owner = "citusdata";
repo = "postgresql-topn";
rev = "refs/tags/v${version}";
sha256 = "sha256-kq3P+a9NWLKN/CsISGHfInbeL4ex4KIeDhTKyyN7FVE=";
sha256 = "sha256-lP6Iil/BUv4ga+co+oBpKv1FBqFuBGfNjueEolM6png=";
};

installPhase = ''
Expand Down
4 changes: 4 additions & 0 deletions pkgs/servers/sql/postgresql/ext/pgaudit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

let
source = {
"17" = {
version = "17.0";
hash = "sha256-3ksq09wiudQPuBQI3dhEQi8IkXKLVIsPFgBnwLiicro=";
};
"16" = {
version = "16.0";
hash = "sha256-8+tGOl1U5y9Zgu+9O5UDDE4bec4B0JC/BQ6GLhHzQzc=";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/servers/sql/postgresql/ext/pgroonga.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

stdenv.mkDerivation rec {
pname = "pgroonga";
version = "3.1.8";
version = "3.2.3";

src = fetchurl {
url = "https://packages.groonga.org/source/${pname}/${pname}-${version}.tar.gz";
hash = "sha256-Wjh0NJK6IfcI30R7HKCsB87/lxXZYEqiMD9t2nldCW4=";
hash = "sha256-k9+DgiLzU2cA3jvw3pMF7/FmDGxsCYtAOaUtf2LMTnw=";
};

nativeBuildInputs = [ pkg-config ];
Expand Down
5 changes: 4 additions & 1 deletion pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ in

meta = with lib; {
# Upstream removed support for PostgreSQL 12 and 13 on 0.3.0: https://github.com/tensorchord/pgvecto.rs/issues/343
broken = stdenv.hostPlatform.isDarwin || (versionOlder postgresql.version "14");
broken = stdenv.hostPlatform.isDarwin || (versionOlder postgresql.version "14") ||
# PostgreSQL 17 support issue upstream: https://github.com/tensorchord/pgvecto.rs/issues/607
# Check after next package update.
versionAtLeast postgresql.version "17" && version == "0.3.0";
description = "Scalable, Low-latency and Hybrid-enabled Vector Search in Postgres";
homepage = "https://github.com/tensorchord/pgvecto.rs";
license = licenses.asl20;
Expand Down
5 changes: 3 additions & 2 deletions pkgs/servers/sql/postgresql/ext/plr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

stdenv.mkDerivation rec {
pname = "plr";
version = "8.4.6";
version = "8.4.7";

src = fetchFromGitHub {
owner = "postgres-plr";
repo = "plr";
rev = "REL${builtins.replaceStrings ["."] ["_"] version}";
sha256 = "sha256-c+wKWL66pulihVQnhdbzivrZOMD1/FfOpb+vFoHgqVg=";
sha256 = "sha256-PdvFEmtKfLT/xfaf6obomPR5hKC9F+wqpfi1heBphRk=";
};

nativeBuildInputs = [ pkg-config ];
Expand All @@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "PL/R - R Procedural Language for PostgreSQL";
homepage = "https://github.com/postgres-plr/plr";
changelog = "https://github.com/postgres-plr/plr/blob/${src.rev}/changelog.md";
maintainers = with maintainers; [ qoelet ];
platforms = postgresql.meta.platforms;
license = licenses.gpl2Only;
Expand Down
5 changes: 3 additions & 2 deletions pkgs/servers/sql/postgresql/ext/plv8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ let
libv8 = nodejs_20.libv8;
in stdenv.mkDerivation (finalAttrs: {
pname = "plv8";
version = "3.2.2";
version = "3.2.3";

src = fetchFromGitHub {
owner = "plv8";
repo = "plv8";
rev = "v${finalAttrs.version}";
hash = "sha256-azO33v22EF+/sTNmwswxyDR0PhrvWfTENuLu6JgSGJ0=";
hash = "sha256-ivQZJSNn5giWF351fqZ7mBZoJkGtby5T7beK45g3Zqs=";
};

patches = [
Expand Down Expand Up @@ -135,6 +135,7 @@ in stdenv.mkDerivation (finalAttrs: {
meta = with lib; {
description = "V8 Engine Javascript Procedural Language add-on for PostgreSQL";
homepage = "https://plv8.github.io/";
changelog = "https://github.com/plv8/plv8/blob/r${finalAttrs.version}/Changes";
maintainers = [ ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
license = licenses.postgresql;
Expand Down
3 changes: 3 additions & 0 deletions pkgs/servers/sql/postgresql/ext/repmgr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ stdenv.mkDerivation rec {
license = licenses.postgresql;
platforms = postgresql.meta.platforms;
maintainers = with maintainers; [ zimbatm ];
# PostgreSQL 17 support issue upstream: https://github.com/EnterpriseDB/repmgr/issues/856
# Check after next package update.
broken = versionAtLeast postgresql.version "17" && version == "5.4.1";
};
}

2 changes: 2 additions & 0 deletions pkgs/servers/sql/postgresql/ext/smlar.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ stdenv.mkDerivation rec {
platforms = postgresql.meta.platforms;
license = licenses.bsd2;
maintainers = [ ];
# Broken on darwin and linux (JIT) with no upstream fix available.
broken = lib.versionAtLeast postgresql.version "16" && stdenv.cc.isClang;
};
}
12 changes: 4 additions & 8 deletions pkgs/servers/sql/postgresql/ext/tds_fdw.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

stdenv.mkDerivation rec {
pname = "tds_fdw";
# Move to stable version when it's released.
version = "2.0.3-unstable-2024-02-10";
version = "2.0.4";

buildInputs = [ postgresql freetds ];

src = fetchFromGitHub {
owner = "tds-fdw";
repo = "tds_fdw";
rev = "f78bd38955d01d3ca357b90717588ec2f90b4991";
hash = "sha256-3J8wzk0YIxRPhALd5PgVW000hzQw3r4rTrnqg9uB/Bo=";
rev = "v${version}";
hash = "sha256-ruelOHueaHx1royLPvDM8Abd1rQD62R4KXgtHY9qqTw=";
};

installPhase = ''
Expand All @@ -21,13 +20,10 @@ stdenv.mkDerivation rec {
install -D tds_fdw.control -t $out/share/postgresql/extension
'';

passthru.updateScript = unstableGitUpdater {
tagPrefix = "v";
};

meta = with lib; {
description = "PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)";
homepage = "https://github.com/tds-fdw/tds_fdw";
changelog = "https://github.com/tds-fdw/tds_fdw/releases/tag/v${version}";
maintainers = [ maintainers.steve-chavez ];
platforms = postgresql.meta.platforms;
license = licenses.postgresql;
Expand Down
7 changes: 6 additions & 1 deletion pkgs/servers/sql/postgresql/ext/timescaledb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ stdenv.mkDerivation rec {
maintainers = [ ];
platforms = postgresql.meta.platforms;
license = with licenses; if enableUnfree then tsl else asl20;
broken = versionOlder postgresql.version "13";
broken = versionOlder postgresql.version "13" ||
# timescaledb supports PostgreSQL 17 from 2.17.0 on:
# https://github.com/timescale/timescaledb/releases/tag/2.17.0
# We can't upgrade to it, yet, because this would imply dropping support for
# PostgreSQL 13, which is a breaking change.
(versionAtLeast postgresql.version "17" && version == "2.14.2");
};
}
3 changes: 3 additions & 0 deletions pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@
maintainers = with maintainers; [ typetetris ];
platforms = postgresql.meta.platforms;
license = licenses.tsl;
# PostgreSQL 17 support issue upstream: https://github.com/timescale/timescaledb-toolkit/issues/813
# Check after next package update.
broken = versionAtLeast postgresql.version "17" && version == "1.18.0";
};
}
Loading

0 comments on commit e34f2c0

Please sign in to comment.