diff --git a/flake.nix b/flake.nix index 55d6fe544..9e26c692a 100644 --- a/flake.nix +++ b/flake.nix @@ -154,7 +154,11 @@ x != ./nix/ext/pgvector.nix && x != ./nix/ext/plv8.nix && x != ./nix/ext/postgis.nix && - x != ./nix/ext/pgrouting.nix + x != ./nix/ext/pgrouting.nix && + x != ./nix/ext/pg_jsonschema.nix && + x != ./nix/ext/pg_graphql.nix && + x != ./nix/ext/rum.nix && + x != ./nix/ext/wal2json.nix ) ourExtensions; orioledbExtensions = orioleFilteredExtensions ++ [ ./nix/ext/orioledb.nix ]; @@ -466,7 +470,7 @@ --subst-var-by 'PGSQL_SUPERUSER' '${pgsqlSuperuser}' \ --subst-var-by 'PSQL15_BINDIR' '${basePackages.psql_15.bin}' \ --subst-var-by 'PSQL16_BINDIR' '${basePackages.psql_16.bin}' \ - --subst-var-by 'PSQLORIOLEDB16_BINDIR' '${basePackages.psql_orioledb-16.bin}' \ + --subst-var-by 'PSQLORIOLEDB17_BINDIR' '${basePackages.psql_orioledb-17.bin}' \ --subst-var-by 'MIGRATIONS_DIR' '${migrationsDir}' \ --subst-var-by 'POSTGRESQL_SCHEMA_SQL' '${postgresqlSchemaSql}' \ --subst-var-by 'PGBOUNCER_AUTH_SCHEMA_SQL' '${pgbouncerAuthSchemaSql}' \ diff --git a/nix/ext/orioledb.nix b/nix/ext/orioledb.nix index 7df4301e2..efe2de413 100644 --- a/nix/ext/orioledb.nix +++ b/nix/ext/orioledb.nix @@ -7,11 +7,11 @@ stdenv.mkDerivation rec { owner = "orioledb"; repo = "orioledb"; rev = "2861cf9091a92bcabbbbf1f4d15f8edff480fea1"; - sha256 = ""; + sha256 = "sha256-VVOHOIhQSQ824vfZlptOj1Gcu6Jg80amjRp7CpUOq6s="; }; version = "patches17_3"; buildInputs = [ curl libkrb5 postgresql python3 openssl ]; - buildPhase = "make USE_PGXS=1 ORIOLEDB_PATCHSET_VERSION=31"; + buildPhase = "make USE_PGXS=1 ORIOLEDB_PATCHSET_VERSION=3"; installPhase = '' runHook preInstall mkdir -p $out/{lib,share/postgresql/extension} diff --git a/nix/ext/pgaudit.nix b/nix/ext/pgaudit.nix index f6c5d8bb0..84fbf440d 100644 --- a/nix/ext/pgaudit.nix +++ b/nix/ext/pgaudit.nix @@ -2,6 +2,10 @@ #adapted from https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/sql/postgresql/ext/pgaudit.nix let source = { + "17" = { + version = "17.0"; + hash = "sha256-3ksq09wiudQPuBQI3dhEQi8IkXKLVIsPFgBnwLiicro="; + }; "16" = { version = "16.0"; hash = "sha256-8+tGOl1U5y9Zgu+9O5UDDE4bec4B0JC/BQ6GLhHzQzc="; diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index 22e55df4e..19b73c162 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -51,7 +51,7 @@ let inherit version; pname = pname + lib.optionalString jitSupport "-jit"; - src = if (builtins.match "17_*" version != null) then + src = if (builtins.match "[0-9][0-9]_.*" version != null) then fetchurl { url = "https://github.com/orioledb/postgres/archive/refs/tags/patches${version}.tar.gz"; inherit hash; @@ -64,7 +64,7 @@ let hardeningEnable = lib.optionals (!stdenv'.cc.isClang) [ "pie" ]; - outputs = [ "out" "lib" "doc" "man" ]; + outputs = [ "out" "lib" ]; setOutputFlags = false; # $out retains configureFlags :-/ buildInputs = [ @@ -83,7 +83,7 @@ let ++ lib.optionals gssSupport [ libkrb5 ] ++ lib.optionals stdenv'.isLinux [ linux-pam ] ++ lib.optionals (!stdenv'.isDarwin) [ libossp_uuid ] - ++ lib.optionals (builtins.match "16_.*" version != null) [ + ++ lib.optionals (builtins.match "[0-9][0-9]_.*" version != null) [ perl bison flex docbook_xsl docbook_xml_dtd_45 docbook_xsl_ns libxslt ]; @@ -97,7 +97,7 @@ let separateDebugInfo = true; - buildFlags = [ "world" ]; + buildFlags = [ "world-bin" ]; # Makes cross-compiling work when xml2-config can't be executed on the host. # Fixed upstream in https://github.com/postgres/postgres/commit/0bc8cebdb889368abdf224aeac8bc197fe4c9ae6 @@ -138,7 +138,7 @@ let (if atLeast "13" then ./patches/socketdir-in-run-13+.patch else ./patches/socketdir-in-run.patch) ]; - installTargets = [ "install-world" ]; + installTargets = [ "install-world-bin" ]; postPatch = '' # Hardcode the path to pgxs so pg_config returns the path in $out @@ -288,7 +288,7 @@ let paths = f pkgs ++ [ postgresql postgresql.lib - postgresql.man # in case user installs this into environment + #TODO RM postgresql.man # in case user installs this into environment ]; nativeBuildInputs = [ makeWrapper ]; diff --git a/nix/postgresql/orioledb-17.nix b/nix/postgresql/orioledb-17.nix index bcf436f55..82ff44e65 100644 --- a/nix/postgresql/orioledb-17.nix +++ b/nix/postgresql/orioledb-17.nix @@ -1,4 +1,4 @@ import ./generic.nix { version = "17_3"; - hash = ""; + hash = "sha256-LOlST80eU+Wmmcmo4WHGwOClYZ+bBahyltsGYeKWCU4="; } diff --git a/nix/tools/run-server.sh.in b/nix/tools/run-server.sh.in index a7e266d18..c802a560e 100644 --- a/nix/tools/run-server.sh.in +++ b/nix/tools/run-server.sh.in @@ -68,6 +68,8 @@ remove_config_items() { if [ "$1" == "orioledb-17" ]; then # Remove items from postgresql.conf sed -i 's/ timescaledb,//g;' "$DATDIR/postgresql.conf" + #as of pg 16.4 + this db_user_namespace totally deprecated and will break the server if setting is present + sed -i 's/db_user_namespace = off/#db_user_namespace = off/g;' "$DATDIR/postgresql.conf" sed -i 's/ timescaledb,//g; s/ vector,//g; s/ plv8,//g; s/ postgis,//g; s/ pgrouting,//g' "$DATDIR/supautils.conf" fi }