From 01463448be78f01a89247071aa8062388e5fde3f Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Thu, 29 Feb 2024 17:42:58 +0100 Subject: [PATCH 01/15] postgresql: refactor to move locale-binary-path.patch into patches/ Seems to have been put in the wrong place. --- pkgs/servers/sql/postgresql/default.nix | 2 +- .../sql/postgresql/{ => patches}/locale-binary-path.patch | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename pkgs/servers/sql/postgresql/{ => patches}/locale-binary-path.patch (100%) diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index 700f0ad99bd1b..cfb9553a6d035 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -116,7 +116,7 @@ let ./patches/findstring.patch (substituteAll { - src = ./locale-binary-path.patch; + src = ./patches/locale-binary-path.patch; locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; }) diff --git a/pkgs/servers/sql/postgresql/locale-binary-path.patch b/pkgs/servers/sql/postgresql/patches/locale-binary-path.patch similarity index 100% rename from pkgs/servers/sql/postgresql/locale-binary-path.patch rename to pkgs/servers/sql/postgresql/patches/locale-binary-path.patch From 9ef7195e08f0a546f4d130c752dfaa21c0ddbfea Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 10 Mar 2024 16:28:01 +0100 Subject: [PATCH 02/15] postgresql: refactor to move packages.nix to ext/default.nix (1/2) This commit is split up into two commits to allow git to detect renames, make rebasing easier and allow a working entry in .git-blame-ignore-revs. To allow bisecting we allow evaluation on every commit by moving the extensions into ext/ext/ first and back to ext/ with the next commit. --- pkgs/servers/sql/postgresql/default.nix | 2 +- pkgs/servers/sql/postgresql/{packages.nix => ext/default.nix} | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/age.nix | 0 .../sql/postgresql/ext/{ => ext}/apache_datasketches.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/citus.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/cstore_fdw.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/h3-pg.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/hypopg.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/jsonb_deep_sum.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/lantern.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/periods.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_auto_failover.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_bigm.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_cron.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_ed25519.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_embedding.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_hint_plan.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_hll.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_ivm.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_net.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_partman.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_rational.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_relusage.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_repack.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_safeupdate.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_similarity.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_squeeze.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_topn.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pg_uuidv7.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pgaudit.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pgjwt.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pgroonga.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pgrouting.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pgsodium.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pgsql-http.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pgtap.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/pgvector.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/plpgsql_check.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/plr.nix | 0 .../{ => ext}/plv8/0001-build-Allow-using-V8-from-system.patch | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/plv8/default.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/postgis.nix | 0 .../sql/postgresql/ext/{ => ext}/promscale_extension.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/repmgr.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/rum.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/smlar.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/tds_fdw.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/temporal_tables.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/timescaledb.nix | 0 .../sql/postgresql/ext/{ => ext}/timescaledb_toolkit.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/tsearch_extras.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/tsja.nix | 0 pkgs/servers/sql/postgresql/ext/{ => ext}/wal2json.nix | 0 53 files changed, 1 insertion(+), 1 deletion(-) rename pkgs/servers/sql/postgresql/{packages.nix => ext/default.nix} (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/age.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/apache_datasketches.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/citus.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/cstore_fdw.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/h3-pg.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/hypopg.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/jsonb_deep_sum.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/lantern.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/periods.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_auto_failover.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_bigm.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_cron.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_ed25519.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_embedding.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_hint_plan.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_hll.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_ivm.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_net.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_partman.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_rational.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_relusage.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_repack.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_safeupdate.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_similarity.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_squeeze.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_topn.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pg_uuidv7.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pgaudit.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pgjwt.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pgroonga.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pgrouting.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pgsodium.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pgsql-http.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pgtap.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/pgvector.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/plpgsql_check.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/plr.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/plv8/0001-build-Allow-using-V8-from-system.patch (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/plv8/default.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/postgis.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/promscale_extension.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/repmgr.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/rum.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/smlar.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/tds_fdw.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/temporal_tables.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/timescaledb.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/timescaledb_toolkit.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/tsearch_extras.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/tsja.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ => ext}/wal2json.nix (100%) diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index cfb9553a6d035..015150bfd7a49 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -283,7 +283,7 @@ let }; newSelf = self // scope; newSuper = { callPackage = newScope (scope // this.pkgs); }; - in import ./packages.nix newSelf newSuper; + in import ./ext newSelf newSuper; withPackages = postgresqlWithPackages { inherit makeWrapper buildEnv; diff --git a/pkgs/servers/sql/postgresql/packages.nix b/pkgs/servers/sql/postgresql/ext/default.nix similarity index 100% rename from pkgs/servers/sql/postgresql/packages.nix rename to pkgs/servers/sql/postgresql/ext/default.nix diff --git a/pkgs/servers/sql/postgresql/ext/age.nix b/pkgs/servers/sql/postgresql/ext/ext/age.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/age.nix rename to pkgs/servers/sql/postgresql/ext/ext/age.nix diff --git a/pkgs/servers/sql/postgresql/ext/apache_datasketches.nix b/pkgs/servers/sql/postgresql/ext/ext/apache_datasketches.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/apache_datasketches.nix rename to pkgs/servers/sql/postgresql/ext/ext/apache_datasketches.nix diff --git a/pkgs/servers/sql/postgresql/ext/citus.nix b/pkgs/servers/sql/postgresql/ext/ext/citus.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/citus.nix rename to pkgs/servers/sql/postgresql/ext/ext/citus.nix diff --git a/pkgs/servers/sql/postgresql/ext/cstore_fdw.nix b/pkgs/servers/sql/postgresql/ext/ext/cstore_fdw.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/cstore_fdw.nix rename to pkgs/servers/sql/postgresql/ext/ext/cstore_fdw.nix diff --git a/pkgs/servers/sql/postgresql/ext/h3-pg.nix b/pkgs/servers/sql/postgresql/ext/ext/h3-pg.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/h3-pg.nix rename to pkgs/servers/sql/postgresql/ext/ext/h3-pg.nix diff --git a/pkgs/servers/sql/postgresql/ext/hypopg.nix b/pkgs/servers/sql/postgresql/ext/ext/hypopg.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/hypopg.nix rename to pkgs/servers/sql/postgresql/ext/ext/hypopg.nix diff --git a/pkgs/servers/sql/postgresql/ext/jsonb_deep_sum.nix b/pkgs/servers/sql/postgresql/ext/ext/jsonb_deep_sum.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/jsonb_deep_sum.nix rename to pkgs/servers/sql/postgresql/ext/ext/jsonb_deep_sum.nix diff --git a/pkgs/servers/sql/postgresql/ext/lantern.nix b/pkgs/servers/sql/postgresql/ext/ext/lantern.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/lantern.nix rename to pkgs/servers/sql/postgresql/ext/ext/lantern.nix diff --git a/pkgs/servers/sql/postgresql/ext/periods.nix b/pkgs/servers/sql/postgresql/ext/ext/periods.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/periods.nix rename to pkgs/servers/sql/postgresql/ext/ext/periods.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_auto_failover.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_auto_failover.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_bigm.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_bigm.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_bigm.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_bigm.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_cron.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_cron.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_cron.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_cron.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_ed25519.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_ed25519.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_ed25519.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_ed25519.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_embedding.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_embedding.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_embedding.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_embedding.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_hint_plan.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_hint_plan.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_hll.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_hll.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_hll.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_hll.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_ivm.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_ivm.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_ivm.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_ivm.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_net.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_net.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_net.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_net.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_partman.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_partman.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_partman.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_partman.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_rational.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_rational.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_rational.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_rational.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_relusage.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_relusage.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_relusage.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_relusage.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_repack.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_repack.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_repack.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_repack.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_safeupdate.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_safeupdate.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_similarity.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_similarity.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_similarity.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_similarity.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_squeeze.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_squeeze.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_squeeze.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_squeeze.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_topn.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_topn.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_topn.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_topn.nix diff --git a/pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix b/pkgs/servers/sql/postgresql/ext/ext/pg_uuidv7.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix rename to pkgs/servers/sql/postgresql/ext/ext/pg_uuidv7.nix diff --git a/pkgs/servers/sql/postgresql/ext/pgaudit.nix b/pkgs/servers/sql/postgresql/ext/ext/pgaudit.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pgaudit.nix rename to pkgs/servers/sql/postgresql/ext/ext/pgaudit.nix diff --git a/pkgs/servers/sql/postgresql/ext/pgjwt.nix b/pkgs/servers/sql/postgresql/ext/ext/pgjwt.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pgjwt.nix rename to pkgs/servers/sql/postgresql/ext/ext/pgjwt.nix diff --git a/pkgs/servers/sql/postgresql/ext/pgroonga.nix b/pkgs/servers/sql/postgresql/ext/ext/pgroonga.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pgroonga.nix rename to pkgs/servers/sql/postgresql/ext/ext/pgroonga.nix diff --git a/pkgs/servers/sql/postgresql/ext/pgrouting.nix b/pkgs/servers/sql/postgresql/ext/ext/pgrouting.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pgrouting.nix rename to pkgs/servers/sql/postgresql/ext/ext/pgrouting.nix diff --git a/pkgs/servers/sql/postgresql/ext/pgsodium.nix b/pkgs/servers/sql/postgresql/ext/ext/pgsodium.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pgsodium.nix rename to pkgs/servers/sql/postgresql/ext/ext/pgsodium.nix diff --git a/pkgs/servers/sql/postgresql/ext/pgsql-http.nix b/pkgs/servers/sql/postgresql/ext/ext/pgsql-http.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pgsql-http.nix rename to pkgs/servers/sql/postgresql/ext/ext/pgsql-http.nix diff --git a/pkgs/servers/sql/postgresql/ext/pgtap.nix b/pkgs/servers/sql/postgresql/ext/ext/pgtap.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pgtap.nix rename to pkgs/servers/sql/postgresql/ext/ext/pgtap.nix diff --git a/pkgs/servers/sql/postgresql/ext/pgvector.nix b/pkgs/servers/sql/postgresql/ext/ext/pgvector.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/pgvector.nix rename to pkgs/servers/sql/postgresql/ext/ext/pgvector.nix diff --git a/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix b/pkgs/servers/sql/postgresql/ext/ext/plpgsql_check.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/plpgsql_check.nix rename to pkgs/servers/sql/postgresql/ext/ext/plpgsql_check.nix diff --git a/pkgs/servers/sql/postgresql/ext/plr.nix b/pkgs/servers/sql/postgresql/ext/ext/plr.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/plr.nix rename to pkgs/servers/sql/postgresql/ext/ext/plr.nix diff --git a/pkgs/servers/sql/postgresql/ext/plv8/0001-build-Allow-using-V8-from-system.patch b/pkgs/servers/sql/postgresql/ext/ext/plv8/0001-build-Allow-using-V8-from-system.patch similarity index 100% rename from pkgs/servers/sql/postgresql/ext/plv8/0001-build-Allow-using-V8-from-system.patch rename to pkgs/servers/sql/postgresql/ext/ext/plv8/0001-build-Allow-using-V8-from-system.patch diff --git a/pkgs/servers/sql/postgresql/ext/plv8/default.nix b/pkgs/servers/sql/postgresql/ext/ext/plv8/default.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/plv8/default.nix rename to pkgs/servers/sql/postgresql/ext/ext/plv8/default.nix diff --git a/pkgs/servers/sql/postgresql/ext/postgis.nix b/pkgs/servers/sql/postgresql/ext/ext/postgis.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/postgis.nix rename to pkgs/servers/sql/postgresql/ext/ext/postgis.nix diff --git a/pkgs/servers/sql/postgresql/ext/promscale_extension.nix b/pkgs/servers/sql/postgresql/ext/ext/promscale_extension.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/promscale_extension.nix rename to pkgs/servers/sql/postgresql/ext/ext/promscale_extension.nix diff --git a/pkgs/servers/sql/postgresql/ext/repmgr.nix b/pkgs/servers/sql/postgresql/ext/ext/repmgr.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/repmgr.nix rename to pkgs/servers/sql/postgresql/ext/ext/repmgr.nix diff --git a/pkgs/servers/sql/postgresql/ext/rum.nix b/pkgs/servers/sql/postgresql/ext/ext/rum.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/rum.nix rename to pkgs/servers/sql/postgresql/ext/ext/rum.nix diff --git a/pkgs/servers/sql/postgresql/ext/smlar.nix b/pkgs/servers/sql/postgresql/ext/ext/smlar.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/smlar.nix rename to pkgs/servers/sql/postgresql/ext/ext/smlar.nix diff --git a/pkgs/servers/sql/postgresql/ext/tds_fdw.nix b/pkgs/servers/sql/postgresql/ext/ext/tds_fdw.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/tds_fdw.nix rename to pkgs/servers/sql/postgresql/ext/ext/tds_fdw.nix diff --git a/pkgs/servers/sql/postgresql/ext/temporal_tables.nix b/pkgs/servers/sql/postgresql/ext/ext/temporal_tables.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/temporal_tables.nix rename to pkgs/servers/sql/postgresql/ext/ext/temporal_tables.nix diff --git a/pkgs/servers/sql/postgresql/ext/timescaledb.nix b/pkgs/servers/sql/postgresql/ext/ext/timescaledb.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/timescaledb.nix rename to pkgs/servers/sql/postgresql/ext/ext/timescaledb.nix diff --git a/pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix b/pkgs/servers/sql/postgresql/ext/ext/timescaledb_toolkit.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix rename to pkgs/servers/sql/postgresql/ext/ext/timescaledb_toolkit.nix diff --git a/pkgs/servers/sql/postgresql/ext/tsearch_extras.nix b/pkgs/servers/sql/postgresql/ext/ext/tsearch_extras.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/tsearch_extras.nix rename to pkgs/servers/sql/postgresql/ext/ext/tsearch_extras.nix diff --git a/pkgs/servers/sql/postgresql/ext/tsja.nix b/pkgs/servers/sql/postgresql/ext/ext/tsja.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/tsja.nix rename to pkgs/servers/sql/postgresql/ext/ext/tsja.nix diff --git a/pkgs/servers/sql/postgresql/ext/wal2json.nix b/pkgs/servers/sql/postgresql/ext/ext/wal2json.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/wal2json.nix rename to pkgs/servers/sql/postgresql/ext/ext/wal2json.nix From 719034f6f6749d624faa28dff259309fc0e3e730 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Thu, 29 Feb 2024 21:15:34 +0100 Subject: [PATCH 03/15] postgresql: refactor to move packages.nix to ext/default.nix (2/2) This aligns more with the commonly used style in nixpkgs. --- .../sql/postgresql/ext/{ext => }/age.nix | 0 .../ext/{ext => }/apache_datasketches.nix | 0 .../sql/postgresql/ext/{ext => }/citus.nix | 0 .../postgresql/ext/{ext => }/cstore_fdw.nix | 0 pkgs/servers/sql/postgresql/ext/default.nix | 106 +++++++++--------- .../sql/postgresql/ext/{ext => }/h3-pg.nix | 0 .../sql/postgresql/ext/{ext => }/hypopg.nix | 0 .../ext/{ext => }/jsonb_deep_sum.nix | 0 .../sql/postgresql/ext/{ext => }/lantern.nix | 0 .../sql/postgresql/ext/{ext => }/periods.nix | 0 .../ext/{ext => }/pg_auto_failover.nix | 0 .../sql/postgresql/ext/{ext => }/pg_bigm.nix | 0 .../sql/postgresql/ext/{ext => }/pg_cron.nix | 0 .../postgresql/ext/{ext => }/pg_ed25519.nix | 0 .../postgresql/ext/{ext => }/pg_embedding.nix | 0 .../postgresql/ext/{ext => }/pg_hint_plan.nix | 0 .../sql/postgresql/ext/{ext => }/pg_hll.nix | 0 .../sql/postgresql/ext/{ext => }/pg_ivm.nix | 0 .../sql/postgresql/ext/{ext => }/pg_net.nix | 0 .../postgresql/ext/{ext => }/pg_partman.nix | 0 .../postgresql/ext/{ext => }/pg_rational.nix | 0 .../postgresql/ext/{ext => }/pg_relusage.nix | 0 .../postgresql/ext/{ext => }/pg_repack.nix | 0 .../ext/{ext => }/pg_safeupdate.nix | 0 .../ext/{ext => }/pg_similarity.nix | 0 .../postgresql/ext/{ext => }/pg_squeeze.nix | 0 .../sql/postgresql/ext/{ext => }/pg_topn.nix | 0 .../postgresql/ext/{ext => }/pg_uuidv7.nix | 0 .../sql/postgresql/ext/{ext => }/pgaudit.nix | 0 .../sql/postgresql/ext/{ext => }/pgjwt.nix | 0 .../sql/postgresql/ext/{ext => }/pgroonga.nix | 0 .../postgresql/ext/{ext => }/pgrouting.nix | 0 .../sql/postgresql/ext/{ext => }/pgsodium.nix | 0 .../postgresql/ext/{ext => }/pgsql-http.nix | 0 .../sql/postgresql/ext/{ext => }/pgtap.nix | 0 .../sql/postgresql/ext/{ext => }/pgvector.nix | 0 .../ext/{ext => }/plpgsql_check.nix | 0 .../sql/postgresql/ext/{ext => }/plr.nix | 0 ...001-build-Allow-using-V8-from-system.patch | 0 .../postgresql/ext/{ext => }/plv8/default.nix | 0 .../sql/postgresql/ext/{ext => }/postgis.nix | 0 .../ext/{ext => }/promscale_extension.nix | 0 .../sql/postgresql/ext/{ext => }/repmgr.nix | 0 .../sql/postgresql/ext/{ext => }/rum.nix | 0 .../sql/postgresql/ext/{ext => }/smlar.nix | 0 .../sql/postgresql/ext/{ext => }/tds_fdw.nix | 0 .../ext/{ext => }/temporal_tables.nix | 0 .../postgresql/ext/{ext => }/timescaledb.nix | 0 .../ext/{ext => }/timescaledb_toolkit.nix | 0 .../ext/{ext => }/tsearch_extras.nix | 0 .../sql/postgresql/ext/{ext => }/tsja.nix | 0 .../sql/postgresql/ext/{ext => }/wal2json.nix | 0 52 files changed, 53 insertions(+), 53 deletions(-) rename pkgs/servers/sql/postgresql/ext/{ext => }/age.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/apache_datasketches.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/citus.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/cstore_fdw.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/h3-pg.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/hypopg.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/jsonb_deep_sum.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/lantern.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/periods.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_auto_failover.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_bigm.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_cron.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_ed25519.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_embedding.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_hint_plan.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_hll.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_ivm.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_net.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_partman.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_rational.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_relusage.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_repack.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_safeupdate.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_similarity.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_squeeze.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_topn.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pg_uuidv7.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pgaudit.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pgjwt.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pgroonga.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pgrouting.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pgsodium.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pgsql-http.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pgtap.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/pgvector.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/plpgsql_check.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/plr.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/plv8/0001-build-Allow-using-V8-from-system.patch (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/plv8/default.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/postgis.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/promscale_extension.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/repmgr.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/rum.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/smlar.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/tds_fdw.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/temporal_tables.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/timescaledb.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/timescaledb_toolkit.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/tsearch_extras.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/tsja.nix (100%) rename pkgs/servers/sql/postgresql/ext/{ext => }/wal2json.nix (100%) diff --git a/pkgs/servers/sql/postgresql/ext/ext/age.nix b/pkgs/servers/sql/postgresql/ext/age.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/age.nix rename to pkgs/servers/sql/postgresql/ext/age.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/apache_datasketches.nix b/pkgs/servers/sql/postgresql/ext/apache_datasketches.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/apache_datasketches.nix rename to pkgs/servers/sql/postgresql/ext/apache_datasketches.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/citus.nix b/pkgs/servers/sql/postgresql/ext/citus.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/citus.nix rename to pkgs/servers/sql/postgresql/ext/citus.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/cstore_fdw.nix b/pkgs/servers/sql/postgresql/ext/cstore_fdw.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/cstore_fdw.nix rename to pkgs/servers/sql/postgresql/ext/cstore_fdw.nix diff --git a/pkgs/servers/sql/postgresql/ext/default.nix b/pkgs/servers/sql/postgresql/ext/default.nix index eabcb0613c0df..b6181da6cf027 100644 --- a/pkgs/servers/sql/postgresql/ext/default.nix +++ b/pkgs/servers/sql/postgresql/ext/default.nix @@ -1,107 +1,107 @@ self: super: { - age = super.callPackage ./ext/age.nix { }; + age = super.callPackage ./age.nix { }; - anonymizer = super.callPackage ./ext/anonymizer.nix { }; + anonymizer = super.callPackage ./anonymizer.nix { }; - apache_datasketches = super.callPackage ./ext/apache_datasketches.nix { }; + apache_datasketches = super.callPackage ./apache_datasketches.nix { }; - citus = super.callPackage ./ext/citus.nix { }; + citus = super.callPackage ./citus.nix { }; - h3-pg = super.callPackage ./ext/h3-pg.nix { }; + h3-pg = super.callPackage ./h3-pg.nix { }; - hypopg = super.callPackage ./ext/hypopg.nix { }; + hypopg = super.callPackage ./hypopg.nix { }; - jsonb_deep_sum = super.callPackage ./ext/jsonb_deep_sum.nix { }; + jsonb_deep_sum = super.callPackage ./jsonb_deep_sum.nix { }; - lantern = super.callPackage ./ext/lantern.nix { }; + lantern = super.callPackage ./lantern.nix { }; - periods = super.callPackage ./ext/periods.nix { }; + periods = super.callPackage ./periods.nix { }; - postgis = super.callPackage ./ext/postgis.nix { }; + postgis = super.callPackage ./postgis.nix { }; - pg_auto_failover = super.callPackage ./ext/pg_auto_failover.nix { }; + pg_auto_failover = super.callPackage ./pg_auto_failover.nix { }; - pg_bigm = super.callPackage ./ext/pg_bigm.nix { }; + pg_bigm = super.callPackage ./pg_bigm.nix { }; - pg_ed25519 = super.callPackage ./ext/pg_ed25519.nix { }; + pg_ed25519 = super.callPackage ./pg_ed25519.nix { }; - pg_embedding = super.callPackage ./ext/pg_embedding.nix { }; + pg_embedding = super.callPackage ./pg_embedding.nix { }; - pg_hint_plan = super.callPackage ./ext/pg_hint_plan.nix { }; + pg_hint_plan = super.callPackage ./pg_hint_plan.nix { }; - pg_ivm = super.callPackage ./ext/pg_ivm.nix { }; + pg_ivm = super.callPackage ./pg_ivm.nix { }; - pg_rational = super.callPackage ./ext/pg_rational.nix { }; + pg_rational = super.callPackage ./pg_rational.nix { }; - pg_repack = super.callPackage ./ext/pg_repack.nix { }; + pg_repack = super.callPackage ./pg_repack.nix { }; - pg_similarity = super.callPackage ./ext/pg_similarity.nix { }; + pg_similarity = super.callPackage ./pg_similarity.nix { }; - pgaudit = super.callPackage ./ext/pgaudit.nix { }; + pgaudit = super.callPackage ./pgaudit.nix { }; - pgroonga = super.callPackage ./ext/pgroonga.nix { }; + pgroonga = super.callPackage ./pgroonga.nix { }; - pgsodium = super.callPackage ./ext/pgsodium.nix { }; + pgsodium = super.callPackage ./pgsodium.nix { }; - pgsql-http = super.callPackage ./ext/pgsql-http.nix { }; + pgsql-http = super.callPackage ./pgsql-http.nix { }; - pgvecto-rs = super.callPackage ./ext/pgvecto-rs { }; + pgvecto-rs = super.callPackage ./pgvecto-rs { }; - pgvector = super.callPackage ./ext/pgvector.nix { }; + pgvector = super.callPackage ./pgvector.nix { }; - plpgsql_check = super.callPackage ./ext/plpgsql_check.nix { }; + plpgsql_check = super.callPackage ./plpgsql_check.nix { }; - plr = super.callPackage ./ext/plr.nix { }; + plr = super.callPackage ./plr.nix { }; - plv8 = super.callPackage ./ext/plv8 { }; + plv8 = super.callPackage ./plv8 { }; - pgjwt = super.callPackage ./ext/pgjwt.nix { }; + pgjwt = super.callPackage ./pgjwt.nix { }; - cstore_fdw = super.callPackage ./ext/cstore_fdw.nix { }; + cstore_fdw = super.callPackage ./cstore_fdw.nix { }; - pg_hll = super.callPackage ./ext/pg_hll.nix { }; + pg_hll = super.callPackage ./pg_hll.nix { }; - pg_cron = super.callPackage ./ext/pg_cron.nix { }; + pg_cron = super.callPackage ./pg_cron.nix { }; - pg_topn = super.callPackage ./ext/pg_topn.nix { }; + pg_topn = super.callPackage ./pg_topn.nix { }; - pg_net = super.callPackage ./ext/pg_net.nix { }; + pg_net = super.callPackage ./pg_net.nix { }; - pgtap = super.callPackage ./ext/pgtap.nix { }; + pgtap = super.callPackage ./pgtap.nix { }; - smlar = super.callPackage ./ext/smlar.nix { }; + smlar = super.callPackage ./smlar.nix { }; - temporal_tables = super.callPackage ./ext/temporal_tables.nix { }; + temporal_tables = super.callPackage ./temporal_tables.nix { }; - timescaledb = super.callPackage ./ext/timescaledb.nix { }; - timescaledb-apache = super.callPackage ./ext/timescaledb.nix { enableUnfree = false; }; + timescaledb = super.callPackage ./timescaledb.nix { }; + timescaledb-apache = super.callPackage ./timescaledb.nix { enableUnfree = false; }; - timescaledb_toolkit = super.callPackage ./ext/timescaledb_toolkit.nix { }; + timescaledb_toolkit = super.callPackage ./timescaledb_toolkit.nix { }; - tsearch_extras = super.callPackage ./ext/tsearch_extras.nix { }; + tsearch_extras = super.callPackage ./tsearch_extras.nix { }; - tds_fdw = super.callPackage ./ext/tds_fdw.nix { }; + tds_fdw = super.callPackage ./tds_fdw.nix { }; - pgrouting = super.callPackage ./ext/pgrouting.nix { }; + pgrouting = super.callPackage ./pgrouting.nix { }; - pg_partman = super.callPackage ./ext/pg_partman.nix { }; + pg_partman = super.callPackage ./pg_partman.nix { }; - pg_relusage = super.callPackage ./ext/pg_relusage.nix { }; + pg_relusage = super.callPackage ./pg_relusage.nix { }; - pg_safeupdate = super.callPackage ./ext/pg_safeupdate.nix { }; + pg_safeupdate = super.callPackage ./pg_safeupdate.nix { }; - pg_squeeze = super.callPackage ./ext/pg_squeeze.nix { }; + pg_squeeze = super.callPackage ./pg_squeeze.nix { }; - pg_uuidv7 = super.callPackage ./ext/pg_uuidv7.nix { }; + pg_uuidv7 = super.callPackage ./pg_uuidv7.nix { }; - promscale_extension = super.callPackage ./ext/promscale_extension.nix { }; + promscale_extension = super.callPackage ./promscale_extension.nix { }; - repmgr = super.callPackage ./ext/repmgr.nix { }; + repmgr = super.callPackage ./repmgr.nix { }; - rum = super.callPackage ./ext/rum.nix { }; + rum = super.callPackage ./rum.nix { }; - tsja = super.callPackage ./ext/tsja.nix { }; + tsja = super.callPackage ./tsja.nix { }; - wal2json = super.callPackage ./ext/wal2json.nix { }; + wal2json = super.callPackage ./wal2json.nix { }; } diff --git a/pkgs/servers/sql/postgresql/ext/ext/h3-pg.nix b/pkgs/servers/sql/postgresql/ext/h3-pg.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/h3-pg.nix rename to pkgs/servers/sql/postgresql/ext/h3-pg.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/hypopg.nix b/pkgs/servers/sql/postgresql/ext/hypopg.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/hypopg.nix rename to pkgs/servers/sql/postgresql/ext/hypopg.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/jsonb_deep_sum.nix b/pkgs/servers/sql/postgresql/ext/jsonb_deep_sum.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/jsonb_deep_sum.nix rename to pkgs/servers/sql/postgresql/ext/jsonb_deep_sum.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/lantern.nix b/pkgs/servers/sql/postgresql/ext/lantern.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/lantern.nix rename to pkgs/servers/sql/postgresql/ext/lantern.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/periods.nix b/pkgs/servers/sql/postgresql/ext/periods.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/periods.nix rename to pkgs/servers/sql/postgresql/ext/periods.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_auto_failover.nix b/pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_auto_failover.nix rename to pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_bigm.nix b/pkgs/servers/sql/postgresql/ext/pg_bigm.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_bigm.nix rename to pkgs/servers/sql/postgresql/ext/pg_bigm.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_cron.nix b/pkgs/servers/sql/postgresql/ext/pg_cron.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_cron.nix rename to pkgs/servers/sql/postgresql/ext/pg_cron.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_ed25519.nix b/pkgs/servers/sql/postgresql/ext/pg_ed25519.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_ed25519.nix rename to pkgs/servers/sql/postgresql/ext/pg_ed25519.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_embedding.nix b/pkgs/servers/sql/postgresql/ext/pg_embedding.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_embedding.nix rename to pkgs/servers/sql/postgresql/ext/pg_embedding.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_hint_plan.nix b/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_hint_plan.nix rename to pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_hll.nix b/pkgs/servers/sql/postgresql/ext/pg_hll.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_hll.nix rename to pkgs/servers/sql/postgresql/ext/pg_hll.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_ivm.nix b/pkgs/servers/sql/postgresql/ext/pg_ivm.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_ivm.nix rename to pkgs/servers/sql/postgresql/ext/pg_ivm.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_net.nix b/pkgs/servers/sql/postgresql/ext/pg_net.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_net.nix rename to pkgs/servers/sql/postgresql/ext/pg_net.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_partman.nix b/pkgs/servers/sql/postgresql/ext/pg_partman.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_partman.nix rename to pkgs/servers/sql/postgresql/ext/pg_partman.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_rational.nix b/pkgs/servers/sql/postgresql/ext/pg_rational.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_rational.nix rename to pkgs/servers/sql/postgresql/ext/pg_rational.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_relusage.nix b/pkgs/servers/sql/postgresql/ext/pg_relusage.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_relusage.nix rename to pkgs/servers/sql/postgresql/ext/pg_relusage.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_repack.nix b/pkgs/servers/sql/postgresql/ext/pg_repack.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_repack.nix rename to pkgs/servers/sql/postgresql/ext/pg_repack.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_safeupdate.nix b/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_safeupdate.nix rename to pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_similarity.nix b/pkgs/servers/sql/postgresql/ext/pg_similarity.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_similarity.nix rename to pkgs/servers/sql/postgresql/ext/pg_similarity.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_squeeze.nix b/pkgs/servers/sql/postgresql/ext/pg_squeeze.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_squeeze.nix rename to pkgs/servers/sql/postgresql/ext/pg_squeeze.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_topn.nix b/pkgs/servers/sql/postgresql/ext/pg_topn.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_topn.nix rename to pkgs/servers/sql/postgresql/ext/pg_topn.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pg_uuidv7.nix b/pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pg_uuidv7.nix rename to pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pgaudit.nix b/pkgs/servers/sql/postgresql/ext/pgaudit.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pgaudit.nix rename to pkgs/servers/sql/postgresql/ext/pgaudit.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pgjwt.nix b/pkgs/servers/sql/postgresql/ext/pgjwt.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pgjwt.nix rename to pkgs/servers/sql/postgresql/ext/pgjwt.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pgroonga.nix b/pkgs/servers/sql/postgresql/ext/pgroonga.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pgroonga.nix rename to pkgs/servers/sql/postgresql/ext/pgroonga.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pgrouting.nix b/pkgs/servers/sql/postgresql/ext/pgrouting.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pgrouting.nix rename to pkgs/servers/sql/postgresql/ext/pgrouting.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pgsodium.nix b/pkgs/servers/sql/postgresql/ext/pgsodium.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pgsodium.nix rename to pkgs/servers/sql/postgresql/ext/pgsodium.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pgsql-http.nix b/pkgs/servers/sql/postgresql/ext/pgsql-http.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pgsql-http.nix rename to pkgs/servers/sql/postgresql/ext/pgsql-http.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pgtap.nix b/pkgs/servers/sql/postgresql/ext/pgtap.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pgtap.nix rename to pkgs/servers/sql/postgresql/ext/pgtap.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/pgvector.nix b/pkgs/servers/sql/postgresql/ext/pgvector.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/pgvector.nix rename to pkgs/servers/sql/postgresql/ext/pgvector.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/plpgsql_check.nix b/pkgs/servers/sql/postgresql/ext/plpgsql_check.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/plpgsql_check.nix rename to pkgs/servers/sql/postgresql/ext/plpgsql_check.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/plr.nix b/pkgs/servers/sql/postgresql/ext/plr.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/plr.nix rename to pkgs/servers/sql/postgresql/ext/plr.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/plv8/0001-build-Allow-using-V8-from-system.patch b/pkgs/servers/sql/postgresql/ext/plv8/0001-build-Allow-using-V8-from-system.patch similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/plv8/0001-build-Allow-using-V8-from-system.patch rename to pkgs/servers/sql/postgresql/ext/plv8/0001-build-Allow-using-V8-from-system.patch diff --git a/pkgs/servers/sql/postgresql/ext/ext/plv8/default.nix b/pkgs/servers/sql/postgresql/ext/plv8/default.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/plv8/default.nix rename to pkgs/servers/sql/postgresql/ext/plv8/default.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/postgis.nix b/pkgs/servers/sql/postgresql/ext/postgis.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/postgis.nix rename to pkgs/servers/sql/postgresql/ext/postgis.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/promscale_extension.nix b/pkgs/servers/sql/postgresql/ext/promscale_extension.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/promscale_extension.nix rename to pkgs/servers/sql/postgresql/ext/promscale_extension.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/repmgr.nix b/pkgs/servers/sql/postgresql/ext/repmgr.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/repmgr.nix rename to pkgs/servers/sql/postgresql/ext/repmgr.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/rum.nix b/pkgs/servers/sql/postgresql/ext/rum.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/rum.nix rename to pkgs/servers/sql/postgresql/ext/rum.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/smlar.nix b/pkgs/servers/sql/postgresql/ext/smlar.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/smlar.nix rename to pkgs/servers/sql/postgresql/ext/smlar.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/tds_fdw.nix b/pkgs/servers/sql/postgresql/ext/tds_fdw.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/tds_fdw.nix rename to pkgs/servers/sql/postgresql/ext/tds_fdw.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/temporal_tables.nix b/pkgs/servers/sql/postgresql/ext/temporal_tables.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/temporal_tables.nix rename to pkgs/servers/sql/postgresql/ext/temporal_tables.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/timescaledb.nix b/pkgs/servers/sql/postgresql/ext/timescaledb.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/timescaledb.nix rename to pkgs/servers/sql/postgresql/ext/timescaledb.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/timescaledb_toolkit.nix b/pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/timescaledb_toolkit.nix rename to pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/tsearch_extras.nix b/pkgs/servers/sql/postgresql/ext/tsearch_extras.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/tsearch_extras.nix rename to pkgs/servers/sql/postgresql/ext/tsearch_extras.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/tsja.nix b/pkgs/servers/sql/postgresql/ext/tsja.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/tsja.nix rename to pkgs/servers/sql/postgresql/ext/tsja.nix diff --git a/pkgs/servers/sql/postgresql/ext/ext/wal2json.nix b/pkgs/servers/sql/postgresql/ext/wal2json.nix similarity index 100% rename from pkgs/servers/sql/postgresql/ext/ext/wal2json.nix rename to pkgs/servers/sql/postgresql/ext/wal2json.nix From 4c8e7af9416730d45667ca55c3e3367adceb89be Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 2 Mar 2024 12:43:09 +0100 Subject: [PATCH 04/15] postgresql: refactor to remove useless references to "self" No need to reference self here, because llvmPackages / stdenv' are available in that scope anyway. Pure refactor, derivations don't change. --- pkgs/servers/sql/postgresql/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index 015150bfd7a49..c769fff259c7d 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -208,18 +208,18 @@ let moveToOutput "lib/llvmjit*" "$out" # In the case of JIT support, prevent a retained dependency on clang-wrapper - substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${self.llvmPackages.stdenv.cc}/bin/clang clang + substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/clang clang nuke-refs $out/lib/llvmjit_types.bc $(find $out/lib/bitcode -type f) # Stop out depending on the default output of llvm substituteInPlace $out/lib/pgxs/src/Makefile.global \ - --replace ${self.llvmPackages.llvm.out}/bin "" \ + --replace ${llvmPackages.llvm.out}/bin "" \ --replace '$(LLVM_BINPATH)/' "" # Stop out depending on the -dev output of llvm substituteInPlace $out/lib/pgxs/src/Makefile.global \ - --replace ${self.llvmPackages.llvm.dev}/bin/llvm-config llvm-config \ - --replace -I${self.llvmPackages.llvm.dev}/include "" + --replace ${llvmPackages.llvm.dev}/bin/llvm-config llvm-config \ + --replace -I${llvmPackages.llvm.dev}/include "" ${lib.optionalString (!stdenv'.isDarwin) '' # Stop lib depending on the -dev output of llvm From 9af8c0a3b7ef345ff0c32e65f110ac71f8a139a7 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 2 Mar 2024 12:19:25 +0100 Subject: [PATCH 05/15] postgresql: refactor to split up default.nix (1/2) This just renames default.nix to generic.nix, because the biggest chunk of code should move that way in the next commit. This gives us a much better diff for the next commit and makes rebasing **much** easier in case of changes. This commit does not stand on its own and needs to go in with the next commit (2/2). --- pkgs/servers/sql/postgresql/{default.nix => generic.nix} | 0 pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename pkgs/servers/sql/postgresql/{default.nix => generic.nix} (100%) diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/generic.nix similarity index 100% rename from pkgs/servers/sql/postgresql/default.nix rename to pkgs/servers/sql/postgresql/generic.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 02964f0d1fd3f..00739c1662583 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26735,7 +26735,7 @@ with pkgs; timescaledb-tune = callPackage ../development/tools/database/timescaledb-tune { }; - inherit (import ../servers/sql/postgresql pkgs) + inherit (import ../servers/sql/postgresql/generic.nix pkgs) postgresql_12 postgresql_13 postgresql_14 From 1d9f2bd7266d46b2f3abaefb5fadba26f0eb8e1a Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Thu, 29 Feb 2024 13:47:03 +0100 Subject: [PATCH 06/15] postgresql: refactor to split up default.nix (2/2) The recommended [1] structure for a package regarding versioning is to have each version in a separate file. This commit just mechanically copies code around without any changes. Pure refactor, not changing any derivations. [1]: pkgs/README.md --- pkgs/servers/sql/postgresql/12.nix | 5 ++ pkgs/servers/sql/postgresql/13.nix | 5 ++ pkgs/servers/sql/postgresql/14.nix | 5 ++ pkgs/servers/sql/postgresql/15.nix | 5 ++ pkgs/servers/sql/postgresql/16.nix | 5 ++ pkgs/servers/sql/postgresql/default.nix | 43 +++++++++++++++++ pkgs/servers/sql/postgresql/generic.nix | 63 +++---------------------- pkgs/top-level/all-packages.nix | 2 +- 8 files changed, 75 insertions(+), 58 deletions(-) create mode 100644 pkgs/servers/sql/postgresql/12.nix create mode 100644 pkgs/servers/sql/postgresql/13.nix create mode 100644 pkgs/servers/sql/postgresql/14.nix create mode 100644 pkgs/servers/sql/postgresql/15.nix create mode 100644 pkgs/servers/sql/postgresql/16.nix create mode 100644 pkgs/servers/sql/postgresql/default.nix diff --git a/pkgs/servers/sql/postgresql/12.nix b/pkgs/servers/sql/postgresql/12.nix new file mode 100644 index 0000000000000..4979df61136e0 --- /dev/null +++ b/pkgs/servers/sql/postgresql/12.nix @@ -0,0 +1,5 @@ +import ./generic.nix { + version = "12.18"; + psqlSchema = "12"; + hash = "sha256-T5kZcl2UHOmGjgf+HtHTqGdIWZtIM4ZUdYOSi3TDkYo="; +} diff --git a/pkgs/servers/sql/postgresql/13.nix b/pkgs/servers/sql/postgresql/13.nix new file mode 100644 index 0000000000000..61985518ce61b --- /dev/null +++ b/pkgs/servers/sql/postgresql/13.nix @@ -0,0 +1,5 @@ +import ./generic.nix { + version = "13.14"; + psqlSchema = "13"; + hash = "sha256-uN8HhVGJiWC9UA3F04oXfpkFN234H+fytmChQH+mpe0="; +} diff --git a/pkgs/servers/sql/postgresql/14.nix b/pkgs/servers/sql/postgresql/14.nix new file mode 100644 index 0000000000000..efd7da0778ab9 --- /dev/null +++ b/pkgs/servers/sql/postgresql/14.nix @@ -0,0 +1,5 @@ +import ./generic.nix { + version = "14.11"; + psqlSchema = "14"; + hash = "sha256-pnC9fc4i3K1Cl7JhE2s7HUoJpvVBcZViqhTKY78paKg="; +} diff --git a/pkgs/servers/sql/postgresql/15.nix b/pkgs/servers/sql/postgresql/15.nix new file mode 100644 index 0000000000000..4efb790542be4 --- /dev/null +++ b/pkgs/servers/sql/postgresql/15.nix @@ -0,0 +1,5 @@ +import ./generic.nix { + version = "15.6"; + psqlSchema = "15"; + hash = "sha256-hFUUbtnGnJOlfelUrq0DAsr60DXCskIXXWqh4X68svs="; +} diff --git a/pkgs/servers/sql/postgresql/16.nix b/pkgs/servers/sql/postgresql/16.nix new file mode 100644 index 0000000000000..2dfc54277df14 --- /dev/null +++ b/pkgs/servers/sql/postgresql/16.nix @@ -0,0 +1,5 @@ +import ./generic.nix { + version = "16.2"; + psqlSchema = "16"; + hash = "sha256-RG6IKU28LJCFq0twYaZG+mBLS+wDUh1epnHC5a2bKVI="; +} diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix new file mode 100644 index 0000000000000..fc242d08ec0b0 --- /dev/null +++ b/pkgs/servers/sql/postgresql/default.nix @@ -0,0 +1,43 @@ +let + mkPackages = self: { + postgresql_12 = import ./12.nix { + this = self.postgresql_12; + thisAttr = "postgresql_12"; + inherit self; + }; + + postgresql_13 = import ./13.nix { + this = self.postgresql_13; + thisAttr = "postgresql_13"; + inherit self; + }; + + postgresql_14 = import ./14.nix { + this = self.postgresql_14; + thisAttr = "postgresql_14"; + inherit self; + }; + + postgresql_15 = import ./15.nix { + this = self.postgresql_15; + thisAttr = "postgresql_15"; + inherit self; + }; + + postgresql_16 = import ./16.nix { + this = self.postgresql_16; + thisAttr = "postgresql_16"; + inherit self; + }; + }; + +in self: + let packages = mkPackages self; in + packages + // self.lib.mapAttrs' + (attrName: postgres: self.lib.nameValuePair "${attrName}_jit" (postgres.override rec { + jitSupport = true; + thisAttr = "${attrName}_jit"; + this = self.${thisAttr}; + })) + packages diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index c769fff259c7d..2e8054060a3a3 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -353,60 +353,9 @@ let passthru.psqlSchema = postgresql.psqlSchema; }; - mkPackages = self: { - postgresql_12 = self.callPackage generic { - version = "12.18"; - psqlSchema = "12"; - hash = "sha256-T5kZcl2UHOmGjgf+HtHTqGdIWZtIM4ZUdYOSi3TDkYo="; - this = self.postgresql_12; - thisAttr = "postgresql_12"; - inherit self; - }; - - postgresql_13 = self.callPackage generic { - version = "13.14"; - psqlSchema = "13"; - hash = "sha256-uN8HhVGJiWC9UA3F04oXfpkFN234H+fytmChQH+mpe0="; - this = self.postgresql_13; - thisAttr = "postgresql_13"; - inherit self; - }; - - postgresql_14 = self.callPackage generic { - version = "14.11"; - psqlSchema = "14"; - hash = "sha256-pnC9fc4i3K1Cl7JhE2s7HUoJpvVBcZViqhTKY78paKg="; - this = self.postgresql_14; - thisAttr = "postgresql_14"; - inherit self; - }; - - postgresql_15 = self.callPackage generic { - version = "15.6"; - psqlSchema = "15"; - hash = "sha256-hFUUbtnGnJOlfelUrq0DAsr60DXCskIXXWqh4X68svs="; - this = self.postgresql_15; - thisAttr = "postgresql_15"; - inherit self; - }; - - postgresql_16 = self.callPackage generic { - version = "16.2"; - psqlSchema = "16"; - hash = "sha256-RG6IKU28LJCFq0twYaZG+mBLS+wDUh1epnHC5a2bKVI="; - this = self.postgresql_16; - thisAttr = "postgresql_16"; - inherit self; - }; - }; - -in self: - let packages = mkPackages self; in - packages - // self.lib.mapAttrs' - (attrName: postgres: self.lib.nameValuePair "${attrName}_jit" (postgres.override rec { - jitSupport = true; - thisAttr = "${attrName}_jit"; - this = self.${thisAttr}; - })) - packages +in +# passed by .nix +versionArgs: +# passed by default.nix +{ self, ... } @defaultArgs: +self.callPackage generic (defaultArgs // versionArgs) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 00739c1662583..02964f0d1fd3f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26735,7 +26735,7 @@ with pkgs; timescaledb-tune = callPackage ../development/tools/database/timescaledb-tune { }; - inherit (import ../servers/sql/postgresql/generic.nix pkgs) + inherit (import ../servers/sql/postgresql pkgs) postgresql_12 postgresql_13 postgresql_14 From 62635c9643b6b44d621508324fdc200d46222382 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Thu, 29 Feb 2024 14:05:47 +0100 Subject: [PATCH 07/15] postgresql: refactor mkPackages in default.nix Refactors some low hanging fruit in default.nix to make it easier to add new versions later on. Pure refactor, not changing any derivations. This change makes it easier to add new versions in default.nix without messing up - and also prevents us from adding version-specific arguments in default.nix by accident in the future. Those should be put in the versioned .nix files instead. --- pkgs/servers/sql/postgresql/default.nix | 62 +++++++++---------------- pkgs/servers/sql/postgresql/generic.nix | 2 +- 2 files changed, 23 insertions(+), 41 deletions(-) diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index fc242d08ec0b0..d8acae8787a63 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -1,43 +1,25 @@ +self: let - mkPackages = self: { - postgresql_12 = import ./12.nix { - this = self.postgresql_12; - thisAttr = "postgresql_12"; - inherit self; - }; - - postgresql_13 = import ./13.nix { - this = self.postgresql_13; - thisAttr = "postgresql_13"; - inherit self; - }; - - postgresql_14 = import ./14.nix { - this = self.postgresql_14; - thisAttr = "postgresql_14"; - inherit self; - }; - - postgresql_15 = import ./15.nix { - this = self.postgresql_15; - thisAttr = "postgresql_15"; - inherit self; - }; - - postgresql_16 = import ./16.nix { - this = self.postgresql_16; - thisAttr = "postgresql_16"; - inherit self; - }; + versions = { + postgresql_12 = ./12.nix; + postgresql_13 = ./13.nix; + postgresql_14 = ./14.nix; + postgresql_15 = ./15.nix; + postgresql_16 = ./16.nix; }; -in self: - let packages = mkPackages self; in - packages - // self.lib.mapAttrs' - (attrName: postgres: self.lib.nameValuePair "${attrName}_jit" (postgres.override rec { - jitSupport = true; - thisAttr = "${attrName}_jit"; - this = self.${thisAttr}; - })) - packages + mkAttributes = jitSupport: + self.lib.mapAttrs' (version: path: + let + attrName = if jitSupport then "${version}_jit" else version; + in + self.lib.nameValuePair attrName (import path { + inherit jitSupport self; + thisAttr = attrName; + this = self.${attrName}; + }) + ) versions; + +in +# variations without and with JIT +(mkAttributes false) // (mkAttributes true) diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 2e8054060a3a3..f2f13a5fadba1 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -21,7 +21,7 @@ let , testers, nixosTests, thisAttr # JIT - , jitSupport ? false + , jitSupport , nukeReferences, patchelf, llvmPackages , makeRustPlatform, buildPgxExtension, cargo, rustc From a92a323a1d0c80aae979112030852ba8b776db4d Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 2 Mar 2024 12:31:12 +0100 Subject: [PATCH 08/15] postgresql: refactor to remove passthru's readline attribute This seems to have been introduced 20 years ago in 5863d4f - but seems to have been a copy&paste mistake from the beginning. AFAICT, it's not used anywhere. --- pkgs/servers/sql/postgresql/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index f2f13a5fadba1..9b000274d4fad 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -262,7 +262,7 @@ let }; in { - inherit readline psqlSchema jitSupport; + inherit psqlSchema jitSupport; withJIT = if jitSupport then this else jitToggle; withoutJIT = if jitSupport then jitToggle else this; From 82e6c4a6094579fa1e3aace27015f5c505e6f6e0 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 2 Mar 2024 12:37:04 +0100 Subject: [PATCH 09/15] postgresql: refactor to remove psqlSchema argument The passthru attribute is still set, but automatically created from the major version number. Fewer moving parts decrease the chance for mistakes. --- pkgs/servers/sql/postgresql/12.nix | 1 - pkgs/servers/sql/postgresql/13.nix | 1 - pkgs/servers/sql/postgresql/14.nix | 1 - pkgs/servers/sql/postgresql/15.nix | 1 - pkgs/servers/sql/postgresql/16.nix | 1 - pkgs/servers/sql/postgresql/generic.nix | 5 +++-- 6 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/servers/sql/postgresql/12.nix b/pkgs/servers/sql/postgresql/12.nix index 4979df61136e0..d29fc7683048f 100644 --- a/pkgs/servers/sql/postgresql/12.nix +++ b/pkgs/servers/sql/postgresql/12.nix @@ -1,5 +1,4 @@ import ./generic.nix { version = "12.18"; - psqlSchema = "12"; hash = "sha256-T5kZcl2UHOmGjgf+HtHTqGdIWZtIM4ZUdYOSi3TDkYo="; } diff --git a/pkgs/servers/sql/postgresql/13.nix b/pkgs/servers/sql/postgresql/13.nix index 61985518ce61b..ba458dfd19097 100644 --- a/pkgs/servers/sql/postgresql/13.nix +++ b/pkgs/servers/sql/postgresql/13.nix @@ -1,5 +1,4 @@ import ./generic.nix { version = "13.14"; - psqlSchema = "13"; hash = "sha256-uN8HhVGJiWC9UA3F04oXfpkFN234H+fytmChQH+mpe0="; } diff --git a/pkgs/servers/sql/postgresql/14.nix b/pkgs/servers/sql/postgresql/14.nix index efd7da0778ab9..b0de8af650ae4 100644 --- a/pkgs/servers/sql/postgresql/14.nix +++ b/pkgs/servers/sql/postgresql/14.nix @@ -1,5 +1,4 @@ import ./generic.nix { version = "14.11"; - psqlSchema = "14"; hash = "sha256-pnC9fc4i3K1Cl7JhE2s7HUoJpvVBcZViqhTKY78paKg="; } diff --git a/pkgs/servers/sql/postgresql/15.nix b/pkgs/servers/sql/postgresql/15.nix index 4efb790542be4..00dfc0cbbc19d 100644 --- a/pkgs/servers/sql/postgresql/15.nix +++ b/pkgs/servers/sql/postgresql/15.nix @@ -1,5 +1,4 @@ import ./generic.nix { version = "15.6"; - psqlSchema = "15"; hash = "sha256-hFUUbtnGnJOlfelUrq0DAsr60DXCskIXXWqh4X68svs="; } diff --git a/pkgs/servers/sql/postgresql/16.nix b/pkgs/servers/sql/postgresql/16.nix index 2dfc54277df14..cdc37b7c62f5f 100644 --- a/pkgs/servers/sql/postgresql/16.nix +++ b/pkgs/servers/sql/postgresql/16.nix @@ -1,5 +1,4 @@ import ./generic.nix { version = "16.2"; - psqlSchema = "16"; hash = "sha256-RG6IKU28LJCFq0twYaZG+mBLS+wDUh1epnHC5a2bKVI="; } diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 9b000274d4fad..3b0a3ea643b2d 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -15,7 +15,7 @@ let , this, self, newScope, buildEnv # source specification - , version, hash, psqlSchema + , version, hash # for tests , testers, nixosTests, thisAttr @@ -262,7 +262,8 @@ let }; in { - inherit psqlSchema jitSupport; + inherit jitSupport; + psqlSchema = lib.versions.major version; withJIT = if jitSupport then this else jitToggle; withoutJIT = if jitSupport then jitToggle else this; From b301c01e3121068b29c04d26fdcd2a71db92fc4d Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Thu, 29 Feb 2024 14:53:46 +0100 Subject: [PATCH 10/15] postgresql: refactor to move musl patches into versioned .nix files This makes it obvious that the required argument muslPatches must be passed when creating a new version file. Pure refactor, not changing any derivations. --- pkgs/servers/sql/postgresql/12.nix | 6 ++++ pkgs/servers/sql/postgresql/13.nix | 10 ++++++ pkgs/servers/sql/postgresql/14.nix | 10 ++++++ pkgs/servers/sql/postgresql/15.nix | 6 ++++ pkgs/servers/sql/postgresql/16.nix | 6 ++++ pkgs/servers/sql/postgresql/generic.nix | 45 ++----------------------- 6 files changed, 40 insertions(+), 43 deletions(-) diff --git a/pkgs/servers/sql/postgresql/12.nix b/pkgs/servers/sql/postgresql/12.nix index d29fc7683048f..9e0388be04513 100644 --- a/pkgs/servers/sql/postgresql/12.nix +++ b/pkgs/servers/sql/postgresql/12.nix @@ -1,4 +1,10 @@ import ./generic.nix { version = "12.18"; hash = "sha256-T5kZcl2UHOmGjgf+HtHTqGdIWZtIM4ZUdYOSi3TDkYo="; + muslPatches = { + icu-collations-hack = { + url = "https://git.alpinelinux.org/aports/plain/testing/postgresql12/icu-collations-hack.patch?id=d5227c91adda59d4e7f55f13468f0314e8869174"; + hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; + }; + }; } diff --git a/pkgs/servers/sql/postgresql/13.nix b/pkgs/servers/sql/postgresql/13.nix index ba458dfd19097..a4870812acdb7 100644 --- a/pkgs/servers/sql/postgresql/13.nix +++ b/pkgs/servers/sql/postgresql/13.nix @@ -1,4 +1,14 @@ import ./generic.nix { version = "13.14"; hash = "sha256-uN8HhVGJiWC9UA3F04oXfpkFN234H+fytmChQH+mpe0="; + muslPatches = { + icu-collations-hack = { + url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/icu-collations-hack.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; + hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; + }; + disable-test-collate-icu-utf8 = { + url = "https://git.alpinelinux.org/aports/plain/main/postgresql13/disable-test-collate.icu.utf8.patch?id=69faa146ec9fff3b981511068f17f9e629d4688b"; + hash = "sha256-jS/qxezaiaKhkWeMCXwpz1SDJwUWn9tzN0uKaZ3Ph2Y="; + }; + }; } diff --git a/pkgs/servers/sql/postgresql/14.nix b/pkgs/servers/sql/postgresql/14.nix index b0de8af650ae4..2de876cf4ad6c 100644 --- a/pkgs/servers/sql/postgresql/14.nix +++ b/pkgs/servers/sql/postgresql/14.nix @@ -1,4 +1,14 @@ import ./generic.nix { version = "14.11"; hash = "sha256-pnC9fc4i3K1Cl7JhE2s7HUoJpvVBcZViqhTKY78paKg="; + muslPatches = { + icu-collations-hack = { + url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/icu-collations-hack.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; + hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; + }; + disable-test-collate-icu-utf8 = { + url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/disable-test-collate.icu.utf8.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; + hash = "sha256-jXe23AxnFjEl+TZQm4R7rStk2Leo08ctxMNmu1xr5zM="; + }; + }; } diff --git a/pkgs/servers/sql/postgresql/15.nix b/pkgs/servers/sql/postgresql/15.nix index 00dfc0cbbc19d..f633dc9750850 100644 --- a/pkgs/servers/sql/postgresql/15.nix +++ b/pkgs/servers/sql/postgresql/15.nix @@ -1,4 +1,10 @@ import ./generic.nix { version = "15.6"; hash = "sha256-hFUUbtnGnJOlfelUrq0DAsr60DXCskIXXWqh4X68svs="; + muslPatches = { + icu-collations-hack = { + url = "https://git.alpinelinux.org/aports/plain/main/postgresql15/icu-collations-hack.patch?id=f424e934e6d076c4ae065ce45e734aa283eecb9c"; + hash = "sha256-HgtmhF4OJYU9macGJbTB9PjQi/yW7c3Akm3U0niWs8I="; + }; + }; } diff --git a/pkgs/servers/sql/postgresql/16.nix b/pkgs/servers/sql/postgresql/16.nix index cdc37b7c62f5f..6a6420643b31a 100644 --- a/pkgs/servers/sql/postgresql/16.nix +++ b/pkgs/servers/sql/postgresql/16.nix @@ -1,4 +1,10 @@ import ./generic.nix { version = "16.2"; hash = "sha256-RG6IKU28LJCFq0twYaZG+mBLS+wDUh1epnHC5a2bKVI="; + muslPatches = { + icu-collations-hack = { + url = "https://git.alpinelinux.org/aports/plain/main/postgresql16/icu-collations-hack.patch?id=08a24be262339fd093e641860680944c3590238e"; + hash = "sha256-+urQdVIlADLdDPeT68XYv5rljhbK8M/7mPZn/cF+FT0="; + }; + }; } diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 3b0a3ea643b2d..cdcffc5f135cb 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -15,7 +15,7 @@ let , this, self, newScope, buildEnv # source specification - , version, hash + , version, hash, muslPatches # for tests , testers, nixosTests, thisAttr @@ -121,48 +121,7 @@ let }) ] ++ lib.optionals stdenv'.hostPlatform.isMusl ( - let - self = { - "12" = { - icu-collations-hack = fetchurl { - url = "https://git.alpinelinux.org/aports/plain/testing/postgresql12/icu-collations-hack.patch?id=d5227c91adda59d4e7f55f13468f0314e8869174"; - hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; - }; - }; - "13" = { - inherit (self."14") icu-collations-hack; - disable-test-collate-icu-utf8 = fetchurl { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql13/disable-test-collate.icu.utf8.patch?id=69faa146ec9fff3b981511068f17f9e629d4688b"; - hash = "sha256-jS/qxezaiaKhkWeMCXwpz1SDJwUWn9tzN0uKaZ3Ph2Y="; - }; - }; - "14" = { - icu-collations-hack = fetchurl { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/icu-collations-hack.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; - hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; - }; - disable-test-collate-icu-utf8 = fetchurl { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/disable-test-collate.icu.utf8.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; - hash = "sha256-jXe23AxnFjEl+TZQm4R7rStk2Leo08ctxMNmu1xr5zM="; - }; - }; - "15" = { - icu-collations-hack = fetchurl { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql15/icu-collations-hack.patch?id=f424e934e6d076c4ae065ce45e734aa283eecb9c"; - hash = "sha256-HgtmhF4OJYU9macGJbTB9PjQi/yW7c3Akm3U0niWs8I="; - }; - }; - "16" = { - icu-collations-hack = fetchurl { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql16/icu-collations-hack.patch?id=08a24be262339fd093e641860680944c3590238e"; - hash = "sha256-+urQdVIlADLdDPeT68XYv5rljhbK8M/7mPZn/cF+FT0="; - }; - }; - }; - - patchesForVersion = self.${lib.versions.major version} or (throw "no musl patches for postgresql ${version}"); - in - lib.attrValues patchesForVersion + map fetchurl (lib.attrValues muslPatches) ) ++ lib.optionals stdenv'.isLinux [ (if atLeast "13" then ./patches/socketdir-in-run-13.patch else ./patches/socketdir-in-run.patch) ]; From 14b3ea2789ef6b8bfb39553919708b6b5672ff67 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 2 Mar 2024 14:04:06 +0100 Subject: [PATCH 11/15] postgresql: refactor to pass jitSupport/llvm via scope instead of passthru This makes it less error-prone to use the llvm package in extensions, because it will always match the package used by the postgresql derivation itself. Previously, you could've accidentally used llvm instead of postgresql.llvm with a different result. --- nixos/modules/services/databases/postgresql.nix | 2 +- pkgs/servers/sql/postgresql/ext/anonymizer.nix | 4 ++-- pkgs/servers/sql/postgresql/ext/plv8/default.nix | 3 ++- pkgs/servers/sql/postgresql/ext/postgis.nix | 4 +++- pkgs/servers/sql/postgresql/generic.nix | 5 ++--- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index c4e76c82ba5c7..c3f3b98ae5e75 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -14,7 +14,7 @@ let # package = pkgs.postgresql_; # }; # works. - base = if cfg.enableJIT && !cfg.package.jitSupport then cfg.package.withJIT else cfg.package; + base = if cfg.enableJIT then cfg.package.withJIT else cfg.package; in if cfg.extraPlugins == [] then base diff --git a/pkgs/servers/sql/postgresql/ext/anonymizer.nix b/pkgs/servers/sql/postgresql/ext/anonymizer.nix index 430911d40108e..b6ec0256ae097 100644 --- a/pkgs/servers/sql/postgresql/ext/anonymizer.nix +++ b/pkgs/servers/sql/postgresql/ext/anonymizer.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, pg-dump-anon, postgresql, runtimeShell }: +{ lib, stdenv, pg-dump-anon, postgresql, runtimeShell, jitSupport, llvm }: stdenv.mkDerivation (finalAttrs: { pname = "postgresql_anonymizer"; @@ -6,7 +6,7 @@ stdenv.mkDerivation (finalAttrs: { inherit (pg-dump-anon) version src passthru; buildInputs = [ postgresql ]; - nativeBuildInputs = [ postgresql ] ++ lib.optional postgresql.jitSupport postgresql.llvm; + nativeBuildInputs = [ postgresql ] ++ lib.optional jitSupport llvm; strictDeps = true; diff --git a/pkgs/servers/sql/postgresql/ext/plv8/default.nix b/pkgs/servers/sql/postgresql/ext/plv8/default.nix index 241aa610c8f9e..fa2f1b7ad2d8e 100644 --- a/pkgs/servers/sql/postgresql/ext/plv8/default.nix +++ b/pkgs/servers/sql/postgresql/ext/plv8/default.nix @@ -4,6 +4,7 @@ , v8 , perl , postgresql +, jitSupport # For test , runCommand , coreutils @@ -138,6 +139,6 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with maintainers; [ marsam ]; platforms = [ "x86_64-linux" "aarch64-linux" ]; license = licenses.postgresql; - broken = postgresql.jitSupport; + broken = jitSupport; }; }) diff --git a/pkgs/servers/sql/postgresql/ext/postgis.nix b/pkgs/servers/sql/postgresql/ext/postgis.nix index 87333fe975040..f069a1b7e90d1 100644 --- a/pkgs/servers/sql/postgresql/ext/postgis.nix +++ b/pkgs/servers/sql/postgresql/ext/postgis.nix @@ -13,6 +13,8 @@ , libiconv , pcre2 , nixosTests +, jitSupport +, llvm }: let @@ -31,7 +33,7 @@ stdenv.mkDerivation rec { buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc pcre2.dev ] ++ lib.optional stdenv.isDarwin libiconv; - nativeBuildInputs = [ perl pkg-config ] ++ lib.optional postgresql.jitSupport postgresql.llvm; + nativeBuildInputs = [ perl pkg-config ] ++ lib.optional jitSupport llvm; dontDisableStatic = true; # postgis config directory assumes /include /lib from the same root for json-c library diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index cdcffc5f135cb..052460da27b22 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -221,7 +221,6 @@ let }; in { - inherit jitSupport; psqlSchema = lib.versions.major version; withJIT = if jitSupport then this else jitToggle; @@ -231,6 +230,8 @@ let pkgs = let scope = { + inherit jitSupport; + inherit (llvmPackages) llvm; postgresql = this; stdenv = stdenv'; buildPgxExtension = buildPgxExtension.override { @@ -257,8 +258,6 @@ let } // lib.optionalAttrs jitSupport { postgresql-jit = nixosTests.postgresql-jit.${thisAttr}; }; - } // lib.optionalAttrs jitSupport { - inherit (llvmPackages) llvm; }; meta = with lib; { From 4b6bce5c313f82d57f711be4ca22dccf30d32c35 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Thu, 29 Feb 2024 19:31:41 +0100 Subject: [PATCH 12/15] postgresql: refactor to remove "this" argument This was proposed by abbradar in #150801, but left out of the follow up PR #221851 by Ma27 to reduce the size of the diff. Compared to the initial proposal this includes the callPackage call in the recursion, which avoids breaking the withJIT/withoutJIT helpers. In terms of nixpkgs, this is a pure refactor, no derivations change. However, this makes downstream expressions like the following possible: (postgresql.override { jitSupport = true; }).pkgs.postgis This would have not worked before without passing another "this" argument, which is error prone as can be seen in this example: https://github.com/PostgREST/postgrest/pull/3222/files --- nixos/modules/services/databases/postgresql.md | 2 +- pkgs/servers/sql/postgresql/default.nix | 1 - pkgs/servers/sql/postgresql/generic.nix | 6 +++--- pkgs/top-level/all-packages.nix | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/databases/postgresql.md b/nixos/modules/services/databases/postgresql.md index 7d141f12b5dea..3ff1f00fa9cfb 100644 --- a/nixos/modules/services/databases/postgresql.md +++ b/nixos/modules/services/databases/postgresql.md @@ -277,7 +277,7 @@ self: super: { Here's a recipe on how to override a particular plugin through an overlay: ``` self: super: { - postgresql_15 = super.postgresql_15.override { this = self.postgresql_15; } // { + postgresql_15 = super.postgresql_15// { pkgs = super.postgresql_15.pkgs // { pg_repack = super.postgresql_15.pkgs.pg_repack.overrideAttrs (_: { name = "pg_repack-v20181024"; diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index d8acae8787a63..d11a2d06b2d26 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -16,7 +16,6 @@ let self.lib.nameValuePair attrName (import path { inherit jitSupport self; thisAttr = attrName; - this = self.${attrName}; }) ) versions; diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 052460da27b22..a669cbb020fb2 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -12,7 +12,7 @@ let , gssSupport ? with stdenv.hostPlatform; !isWindows && !isStatic # for postgresql.pkgs - , this, self, newScope, buildEnv + , self, newScope, buildEnv # source specification , version, hash, muslPatches @@ -32,7 +32,7 @@ let # detection of crypt fails when using llvm stdenv, so we add it manually # for <13 (where it got removed: https://github.com/postgres/postgres/commit/c45643d618e35ec2fe91438df15abd4f3c0d85ca) , libxcrypt - }: + } @args: let atLeast = lib.versionAtLeast version; olderThan = lib.versionOlder version; @@ -215,9 +215,9 @@ let disallowedReferences = [ stdenv'.cc ]; passthru = let + this = self.callPackage generic args; jitToggle = this.override { jitSupport = !jitSupport; - this = jitToggle; }; in { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 02964f0d1fd3f..9a09007b4e42c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26748,8 +26748,8 @@ with pkgs; postgresql_15_jit postgresql_16_jit ; - postgresql = postgresql_15.override { this = postgresql; }; - postgresql_jit = postgresql_15_jit.override { this = postgresql_jit; }; + postgresql = postgresql_15; + postgresql_jit = postgresql_15_jit; postgresqlPackages = recurseIntoAttrs postgresql.pkgs; postgresqlJitPackages = recurseIntoAttrs postgresql_jit.pkgs; postgresql12Packages = recurseIntoAttrs postgresql_12.pkgs; From d7ae1c5143c75e7823a09166f1d62fdcde30c903 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 10 Mar 2024 19:49:39 +0100 Subject: [PATCH 13/15] postgresql: refactor to remove doInstallCheck = false This is the default anyway. --- pkgs/servers/sql/postgresql/generic.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index a669cbb020fb2..e2547e5d3f0a5 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -210,8 +210,6 @@ let --replace "object_address" "" '' else null; - doInstallCheck = false; # needs a running daemon? - disallowedReferences = [ stdenv'.cc ]; passthru = let From e6bfabf366b7dfdf67e24877dc5a24c5c1f8e62e Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 12 Mar 2024 21:16:33 +0100 Subject: [PATCH 14/15] postgresql: rename enableSystemd to systemdSupport for consistency We have gssSupport, jitSupport and pythonSupport - but enableSystemd? Across nixpkgs there are currently three styles commonly used, about equally often: withX, xSupport and enableX. Let's at least use one consistent style in this package. --- pkgs/servers/sql/postgresql/generic.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index e2547e5d3f0a5..d6f7f3a72fddf 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -8,7 +8,8 @@ let , linux-pam # This is important to obtain a version of `libpq` that does not depend on systemd. - , enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd && !stdenv.hostPlatform.isStatic + , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd && !stdenv.hostPlatform.isStatic + , enableSystemd ? null , gssSupport ? with stdenv.hostPlatform; !isWindows && !isStatic # for postgresql.pkgs @@ -39,6 +40,8 @@ let lz4Enabled = atLeast "14"; zstdEnabled = atLeast "15"; + systemdSupport' = if enableSystemd == null then systemdSupport else (lib.warn "postgresql: argument enableSystemd is deprecated, please use systemdSupport instead." enableSystemd); + pname = "postgresql"; stdenv' = if jitSupport then llvmPackages.stdenv else stdenv; @@ -66,7 +69,7 @@ let ++ lib.optionals jitSupport [ llvmPackages.llvm ] ++ lib.optionals lz4Enabled [ lz4 ] ++ lib.optionals zstdEnabled [ zstd ] - ++ lib.optionals enableSystemd [ systemd ] + ++ lib.optionals systemdSupport' [ systemd ] ++ lib.optionals pythonSupport [ python3 ] ++ lib.optionals gssSupport [ libkrb5 ] ++ lib.optionals stdenv'.isLinux [ linux-pam ] @@ -97,7 +100,7 @@ let "--libdir=$(lib)/lib" "--with-system-tzdata=${tzdata}/share/zoneinfo" "--enable-debug" - (lib.optionalString enableSystemd "--with-systemd") + (lib.optionalString systemdSupport' "--with-systemd") (if stdenv'.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") ] ++ lib.optionals lz4Enabled [ "--with-lz4" ] ++ lib.optionals zstdEnabled [ "--with-zstd" ] From 01444957bad77f93aca788fdbd2eca8e4c4da97e Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 16 Mar 2024 11:52:12 +0100 Subject: [PATCH 15/15] postgresql: explain use of fetchurl for alpine patches --- pkgs/servers/sql/postgresql/generic.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index d6f7f3a72fddf..5d93cf9aa31b2 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -124,6 +124,7 @@ let }) ] ++ lib.optionals stdenv'.hostPlatform.isMusl ( + # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 map fetchurl (lib.attrValues muslPatches) ) ++ lib.optionals stdenv'.isLinux [ (if atLeast "13" then ./patches/socketdir-in-run-13.patch else ./patches/socketdir-in-run.patch)