Skip to content

Commit c465a25

Browse files
committed
feat: wip 15.8 and 16.3 pg bundles
1 parent 26bdc46 commit c465a25

17 files changed

+58
-89
lines changed

flake.nix

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,7 @@
288288
# Define the available PostgreSQL versions
289289
postgresVersions = {
290290
psql_15 = makePostgres "15";
291-
# Uncomment the line below to enable PostgreSQL 16
292-
# psql_16 = makePostgres "16";
291+
psql_16 = makePostgres "16";
293292
# psql_orioledb_16 = makeOrioleDbPostgres "16_23" postgresql_orioledb_16;
294293
};
295294

@@ -305,16 +304,19 @@
305304
postgresql = postgresqlPackage;
306305
};
307306
postgresql_15 = getPostgresqlPackage "15";
307+
postgresql_16 = getPostgresqlPackage "16";
308308
in
309309
postgresVersions //{
310310
supabase-groonga = supabase-groonga;
311311
# PostgreSQL versions.
312-
psql_15 = makePostgres "15";
312+
psql_15 = postgresVersions.psql_15;
313+
psql_16 = postgresVersions.psql_16;
313314
#psql_orioledb_16 = makeOrioleDbPostgres "16_23" postgresql_orioledb_16;
314315
sfcgal = sfcgal;
315316
pg_prove = pkgs.perlPackages.TAPParserSourceHandlerpgTAP;
316-
inherit postgresql_15;
317+
inherit postgresql_15 postgresql_16;
317318
postgresql_15_debug = if pkgs.stdenv.isLinux then postgresql_15.debug else null;
319+
postgresql_16_debug = if pkgs.stdenv.isLinux then postgresql_16.debug else null;
318320
postgresql_15_src = pkgs.stdenv.mkDerivation {
319321
pname = "postgresql-15-src";
320322
version = postgresql_15.version;
@@ -337,6 +339,29 @@
337339
platforms = platforms.all;
338340
};
339341
};
342+
postgresql_16_src = pkgs.stdenv.mkDerivation {
343+
pname = "postgresql-16-src";
344+
version = postgresql_16.version;
345+
346+
src = postgresql_16.src;
347+
348+
nativeBuildInputs = [ pkgs.bzip2 ];
349+
350+
phases = [ "unpackPhase" "installPhase" ];
351+
352+
installPhase = ''
353+
mkdir -p $out
354+
cp -r . $out
355+
'';
356+
357+
meta = with pkgs.lib; {
358+
description = "PostgreSQL 15 source files";
359+
homepage = "https://www.postgresql.org/";
360+
license = licenses.postgresql;
361+
platforms = platforms.all;
362+
};
363+
};
364+
340365
mecab_naist_jdic = mecab-naist-jdic;
341366
supabase_groonga = supabase-groonga;
342367
pg_regress = makePgRegress activeVersion;
@@ -394,6 +419,7 @@
394419
--subst-var-by 'PGSQL_DEFAULT_PORT' '${pgsqlDefaultPort}' \
395420
--subst-var-by 'PGSQL_SUPERUSER' '${pgsqlSuperuser}' \
396421
--subst-var-by 'PSQL15_BINDIR' '${basePackages.psql_15.bin}' \
422+
--subst-var-by 'PSQL16_BINDIR' '${basePackages.psql_16.bin}' \
397423
--subst-var-by 'PSQL_CONF_FILE' $out/etc/postgresql/postgresql.conf \
398424
--subst-var-by 'PGSODIUM_GETKEY' '${getkeyScript}' \
399425
--subst-var-by 'READREPL_CONF_FILE' "$out/etc/postgresql-custom/read-replica.conf" \
@@ -423,6 +449,7 @@
423449
--subst-var-by 'PGSQL_DEFAULT_PORT' '${pgsqlDefaultPort}' \
424450
--subst-var-by 'PGSQL_SUPERUSER' '${pgsqlSuperuser}' \
425451
--subst-var-by 'PSQL15_BINDIR' '${basePackages.psql_15.bin}' \
452+
--subst-var-by 'PSQL16_BINDIR' '${basePackages.psql_16.bin}' \
426453
--subst-var-by 'MIGRATIONS_DIR' '${migrationsDir}' \
427454
--subst-var-by 'POSTGRESQL_SCHEMA_SQL' '${postgresqlSchemaSql}' \
428455
--subst-var-by 'PGBOUNCER_AUTH_SCHEMA_SQL' '${pgbouncerAuthSchemaSql}' \

nix/ext/hypopg.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
1616
installPhase = ''
1717
mkdir -p $out/{lib,share/postgresql/extension}
1818
19-
cp *.so $out/lib
19+
cp *${postgresql.dlSuffix} $out/lib
2020
cp *.sql $out/share/postgresql/extension
2121
cp *.control $out/share/postgresql/extension
2222
'';

nix/ext/pg_backtrace.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
1818
installPhase = ''
1919
mkdir -p $out/{lib,share/postgresql/extension}
2020
21-
cp *.so $out/lib
21+
cp *${postgresql.dlSuffix} $out/lib
2222
cp *.sql $out/share/postgresql/extension
2323
cp *.control $out/share/postgresql/extension
2424
'';

nix/ext/pg_cron.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
1616
installPhase = ''
1717
mkdir -p $out/{lib,share/postgresql/extension}
1818
19-
cp *.so $out/lib
19+
cp *${postgresql.dlSuffix} $out/lib
2020
cp *.sql $out/share/postgresql/extension
2121
cp *.control $out/share/postgresql/extension
2222
'';

nix/ext/pg_hashids.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
1616
installPhase = ''
1717
mkdir -p $out/{lib,share/postgresql/extension}
1818
19-
cp *.so $out/lib
19+
cp *${postgresql.dlSuffix} $out/lib
2020
cp *.sql $out/share/postgresql/extension
2121
cp *.control $out/share/postgresql/extension
2222
'';

nix/ext/pg_net.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
1818
installPhase = ''
1919
mkdir -p $out/{lib,share/postgresql/extension}
2020
21-
cp *.so $out/lib
21+
cp *${postgresql.dlSuffix} $out/lib
2222
cp sql/*.sql $out/share/postgresql/extension
2323
cp *.control $out/share/postgresql/extension
2424
'';

nix/ext/pg_plan_filter.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
1616
installPhase = ''
1717
mkdir -p $out/{lib,share/postgresql/extension}
1818
19-
cp *.so $out/lib
19+
cp *${postgresql.dlSuffix} $out/lib
2020
cp *.sql $out/share/postgresql/extension
2121
'';
2222

nix/ext/pg_stat_monitor.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
3333
installPhase = ''
3434
mkdir -p $out/{lib,share/postgresql/extension}
3535
36-
cp *.so $out/lib
36+
cp *${postgresql.dlSuffix} $out/lib
3737
cp *.sql $out/share/postgresql/extension
3838
cp *.control $out/share/postgresql/extension
3939
'';

nix/ext/pg_tle.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
2121
installPhase = ''
2222
mkdir -p $out/{lib,share/postgresql/extension}
2323
24-
cp *.so $out/lib
24+
cp *${postgresql.dlSuffix} $out/lib
2525
cp *.sql $out/share/postgresql/extension
2626
cp *.control $out/share/postgresql/extension
2727
'';

nix/ext/pgrouting.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
stdenv.mkDerivation rec {
44
pname = "pgrouting";
5-
version = "3.4.1";
5+
version = "3.6.2";
66

77
nativeBuildInputs = [ cmake perl ];
88
buildInputs = [ postgresql boost ];
99

1010
src = fetchFromGitHub {
1111
owner = "pgRouting";
12-
repo = pname;
12+
repo = "pgrouting";
1313
rev = "v${version}";
14-
hash = "sha256-QC77AnPGpPQGEWi6JtJdiNsB2su5+aV2pKg5ImR2B0k=";
14+
hash = "sha256-r+OkhieKTiOfYSnDbiy3p8V8cgb8I1+bneFwItDfDYo=";
1515
};
1616

1717
installPhase = ''
18-
install -D lib/*.so -t $out/lib
18+
install -D lib/*so -t $out/lib
1919
install -D sql/pgrouting--${version}.sql -t $out/share/postgresql/extension
2020
install -D sql/common/pgrouting.control -t $out/share/postgresql/extension
2121
'';
@@ -28,4 +28,4 @@ stdenv.mkDerivation rec {
2828
platforms = postgresql.meta.platforms;
2929
license = licenses.gpl2Plus;
3030
};
31-
}
31+
}

0 commit comments

Comments
 (0)