Skip to content

Commit 0fbffad

Browse files
postgresqlPackages: housekeeping (NixOS#390487)
2 parents afdcdae + 65cee89 commit 0fbffad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+571
-678
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
self: super:
2+
let
3+
inherit (self) lib config;
4+
in
5+
(lib.packagesFromDirectoryRecursive {
6+
inherit (super) callPackage;
7+
directory = ./ext;
8+
})
9+
// {
10+
timescaledb-apache = super.callPackage ./ext/timescaledb.nix { enableUnfree = false; };
11+
}
12+
// lib.optionalAttrs config.allowAliases {
13+
pg_embedding = throw "PostgreSQL extension `pg_embedding` has been removed since the project has been abandoned. Upstream's recommendation is to use pgvector instead (https://neon.tech/docs/extensions/pg_embedding#migrate-from-pg_embedding-to-pgvector)";
14+
}

pkgs/servers/sql/postgresql/ext/age.nix

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
lib,
3-
stdenv,
42
bison,
53
fetchFromGitHub,
64
flex,
5+
lib,
76
perl,
87
postgresql,
9-
buildPostgresqlExtension,
8+
postgresqlBuildExtension,
9+
stdenv,
1010
}:
1111

1212
let
@@ -17,17 +17,16 @@ let
1717
"15" = "sha256-webZWgWZGnSoXwTpk816tjbtHV1UIlXkogpBDAEL4gM=";
1818
"14" = "sha256-jZXhcYBubpjIJ8M5JHXKV5f6VK/2BkypH3P7nLxZz3E=";
1919
"13" = "sha256-HR6nnWt/V2a0rD5eHHUsFIZ1y7lmvLz36URt9pPJnCw=";
20-
"12" = "sha256-JFNk17ESsIt20dwXrfBkQ5E6DbZzN/Q9eS6+WjCXGd4=";
2120
};
2221
in
23-
buildPostgresqlExtension rec {
22+
postgresqlBuildExtension rec {
2423
pname = "age";
2524
version = "1.5.0-rc0";
2625

2726
src = fetchFromGitHub {
2827
owner = "apache";
2928
repo = "age";
30-
rev = "PG${lib.versions.major postgresql.version}/v${
29+
tag = "PG${lib.versions.major postgresql.version}/v${
3130
builtins.replaceStrings [ "." ] [ "_" ] version
3231
}";
3332
hash =
@@ -73,13 +72,13 @@ buildPostgresqlExtension rec {
7372
'';
7473
};
7574

76-
meta = with lib; {
77-
broken = !builtins.elem (versions.major postgresql.version) (builtins.attrNames hashes);
75+
meta = {
76+
broken = !builtins.elem (lib.versions.major postgresql.version) (builtins.attrNames hashes);
7877
description = "Graph database extension for PostgreSQL";
7978
homepage = "https://age.apache.org/";
8079
changelog = "https://github.com/apache/age/raw/v${src.rev}/RELEASE";
8180
maintainers = [ ];
8281
platforms = postgresql.meta.platforms;
83-
license = licenses.asl20;
82+
license = lib.licenses.asl20;
8483
};
8584
}

pkgs/servers/sql/postgresql/ext/anonymizer.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2+
jitSupport,
23
lib,
3-
stdenv,
4+
llvm,
5+
nixosTests,
46
pg-dump-anon,
57
postgresql,
8+
postgresqlBuildExtension,
69
runtimeShell,
7-
jitSupport,
8-
llvm,
9-
buildPostgresqlExtension,
10-
nixosTests,
10+
stdenv,
1111
}:
1212

13-
buildPostgresqlExtension (finalAttrs: {
13+
postgresqlBuildExtension (finalAttrs: {
1414
pname = "postgresql_anonymizer";
1515

1616
inherit (pg-dump-anon) version src;

pkgs/servers/sql/postgresql/ext/apache_datasketches.nix

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
stdenv,
3-
lib,
2+
boost186,
43
fetchFromGitHub,
4+
lib,
55
postgresql,
6-
boost186,
6+
postgresqlBuildExtension,
77
postgresqlTestExtension,
8-
buildPostgresqlExtension,
8+
stdenv,
99
}:
1010

1111
let
@@ -15,20 +15,20 @@ let
1515
name = "datasketches-postgresql";
1616
owner = "apache";
1717
repo = "datasketches-postgresql";
18-
rev = "refs/tags/${version}";
18+
tag = version;
1919
hash = "sha256-W41uAs3W4V7c9O/wBw3rut65bcmY8EdQS1/tPszMGqA=";
2020
};
2121

2222
cpp_src = fetchFromGitHub {
2323
name = "datasketches-cpp";
2424
owner = "apache";
2525
repo = "datasketches-cpp";
26-
rev = "refs/tags/5.0.2";
26+
tag = "5.0.2";
2727
hash = "sha256-yGk1OckYipAgLTQK6w6p6EdHMxBIQSjPV/MMND3cDks=";
2828
};
2929
in
3030

31-
buildPostgresqlExtension (finalAttrs: {
31+
postgresqlBuildExtension (finalAttrs: {
3232
pname = "apache_datasketches";
3333
inherit version;
3434

pkgs/servers/sql/postgresql/ext/citus.nix

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,49 @@
11
{
2-
lib,
3-
stdenv,
42
curl,
53
fetchFromGitHub,
4+
fetchpatch,
5+
lib,
66
lz4,
77
postgresql,
8-
buildPostgresqlExtension,
8+
postgresqlBuildExtension,
9+
stdenv,
910
}:
1011

11-
buildPostgresqlExtension rec {
12+
postgresqlBuildExtension rec {
1213
pname = "citus";
13-
version = "13.0.0";
14+
version = "13.0.2";
1415

1516
src = fetchFromGitHub {
1617
owner = "citusdata";
1718
repo = "citus";
18-
rev = "v${version}";
19-
hash = "sha256-1if/rYMQV1RG4ZkjqTFuFYu5f1JhJiMF4rCVo8gp7+8=";
19+
tag = "v${version}";
20+
hash = "sha256-SuJs6OCHKO7efQagsATgn/V9rgMyuXQIHGCEP9ME7tQ=";
2021
};
2122

23+
patches = [
24+
# Even though this commit is on main since Sep 2023, it hasn't made its way to the release-13.0 branch, yet.
25+
# https://github.com/citusdata/citus/pull/7221
26+
# Fixes build for PG 16 + 17 on darwin
27+
(fetchpatch {
28+
url = "https://github.com/citusdata/citus/commit/0f28a69f12418d211ffba5f7ddd222fd0c47daeb.patch";
29+
hash = "sha256-8JAM+PUswzbdlAZUpRApgO0eBsMbUHFdFGsdATsG88I=";
30+
})
31+
];
32+
2233
buildInputs = [
2334
curl
2435
lz4
2536
];
2637

27-
meta = with lib; {
38+
meta = {
2839
# "Our soft policy for Postgres version compatibility is to support Citus'
2940
# latest release with Postgres' 3 latest releases."
3041
# https://www.citusdata.com/updates/v12-0/#deprecated_features
31-
broken =
32-
versionOlder postgresql.version "14"
33-
||
34-
# PostgreSQL 17 support issue upstream: https://github.com/citusdata/citus/issues/7708
35-
# Check after next package update.
36-
(versionAtLeast postgresql.version "17" && version == "12.1.6");
42+
broken = lib.versionOlder postgresql.version "15";
3743
description = "Distributed PostgreSQL as an extension";
3844
homepage = "https://www.citusdata.com/";
3945
changelog = "https://github.com/citusdata/citus/blob/${src.rev}/CHANGELOG.md";
40-
license = licenses.agpl3Only;
46+
license = lib.licenses.agpl3Only;
4147
maintainers = [ ];
4248
inherit (postgresql.meta) platforms;
4349
};
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
lib,
3-
stdenv,
42
fetchFromGitHub,
3+
lib,
54
postgresql,
5+
postgresqlBuildExtension,
66
protobufc,
7-
buildPostgresqlExtension,
7+
stdenv,
88
}:
99

10-
buildPostgresqlExtension {
10+
postgresqlBuildExtension {
1111
pname = "cstore_fdw";
1212
version = "1.7.0-unstable-2021-03-08";
1313

@@ -18,15 +18,15 @@ buildPostgresqlExtension {
1818
owner = "citusdata";
1919
repo = "cstore_fdw";
2020
rev = "90e22b62fbee6852529104fdd463f532cf7a3311";
21-
sha256 = "sha256-02wcCqs8A5ZOZX080fgcNJTQrYQctnlwnA8+YPaRTZc=";
21+
hash = "sha256-02wcCqs8A5ZOZX080fgcNJTQrYQctnlwnA8+YPaRTZc=";
2222
};
2323

24-
meta = with lib; {
25-
broken = versionAtLeast postgresql.version "14";
24+
meta = {
25+
broken = lib.versionAtLeast postgresql.version "14";
2626
description = "Columnar storage for PostgreSQL";
2727
homepage = "https://github.com/citusdata/cstore_fdw";
28-
maintainers = with maintainers; [ thoughtpolice ];
28+
maintainers = with lib.maintainers; [ thoughtpolice ];
2929
platforms = postgresql.meta.platforms;
30-
license = licenses.asl20;
30+
license = lib.licenses.asl20;
3131
};
3232
}

pkgs/servers/sql/postgresql/ext/default.nix

Lines changed: 0 additions & 127 deletions
This file was deleted.

0 commit comments

Comments
 (0)