From e01b63ac432c7acde35b92dd107c1af464e578f1 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 28 Sep 2024 21:36:28 +0200 Subject: [PATCH] postgresql_17: init at 17.0 --- pkgs/servers/sql/postgresql/17.nix | 4 ++++ pkgs/servers/sql/postgresql/default.nix | 1 + pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix | 4 ++++ pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix | 4 ++++ pkgs/servers/sql/postgresql/ext/pgaudit.nix | 4 ++++ pkgs/servers/sql/postgresql/generic.nix | 12 +++++++----- pkgs/top-level/all-packages.nix | 6 +++++- 7 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 pkgs/servers/sql/postgresql/17.nix diff --git a/pkgs/servers/sql/postgresql/17.nix b/pkgs/servers/sql/postgresql/17.nix new file mode 100644 index 0000000000000..f99c757ce0f0b --- /dev/null +++ b/pkgs/servers/sql/postgresql/17.nix @@ -0,0 +1,4 @@ +import ./generic.nix { + version = "17.0"; + hash = "sha256-fidhMcD91rYliNutmzuyS4w0mNUAkyjbpZrxboGRCd4="; +} diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index 3040e8074b32c..8eb20188651f7 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -14,6 +14,7 @@ let postgresql_14 = ./14.nix; postgresql_15 = ./15.nix; postgresql_16 = ./16.nix; + postgresql_17 = ./17.nix; }; mkAttributes = jitSupport: diff --git a/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix b/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix index afc5b9fe65065..8983acb3152a3 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix @@ -2,6 +2,10 @@ let source = { + "17" = { + version = "1.7.0"; + hash = "sha256-MNQMePDmGxC8OFIJuVJrhfgU566vkng00+tjeGpGKvs="; + }; "16" = { version = "1.6.0"; hash = "sha256-lg7N0QblluTgtNo1tGZjirNJSyQXtcAEs9Jqd3zx0Sg="; diff --git a/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix b/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix index 6637c98c95654..4aeec3e31f090 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix @@ -21,6 +21,10 @@ with { version = "1.5"; sha256 = "sha256-RRSpkWLFuif+6RCncnsb1NnjKnIIRY9KgebKkjCN5cs="; }; + "17" = { + version = "1.5"; + sha256 = "sha256-RRSpkWLFuif+6RCncnsb1NnjKnIIRY9KgebKkjCN5cs="; + }; }."${lib.versions.major postgresql.version}" or (throw "pg_safeupdate: version specification for pg ${postgresql.version} missing."); stdenv.mkDerivation rec { diff --git a/pkgs/servers/sql/postgresql/ext/pgaudit.nix b/pkgs/servers/sql/postgresql/ext/pgaudit.nix index f4c03d611f503..1079a13b2dfc0 100644 --- a/pkgs/servers/sql/postgresql/ext/pgaudit.nix +++ b/pkgs/servers/sql/postgresql/ext/pgaudit.nix @@ -2,6 +2,10 @@ let source = { + "17" = { + version = "17.0"; + hash = "sha256-3ksq09wiudQPuBQI3dhEQi8IkXKLVIsPFgBnwLiicro="; + }; "16" = { version = "16.0"; hash = "sha256-8+tGOl1U5y9Zgu+9O5UDDE4bec4B0JC/BQ6GLhHzQzc="; diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 07cff1a1adae0..4054d8adde1d4 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -5,7 +5,7 @@ let { stdenv, lib, fetchurl, fetchpatch, makeWrapper , glibc, zlib, readline, openssl, icu, lz4, zstd, systemdLibs, libossp_uuid , pkg-config, libxml2, tzdata, libkrb5, substituteAll, darwin - , linux-pam + , linux-pam, bison, flex, perl, docbook_xml_dtd_45, docbook-xsl-nons, libxslt , removeReferencesTo, writeShellApplication @@ -117,7 +117,8 @@ let pkg-config removeReferencesTo ] - ++ lib.optionals jitSupport [ llvmPackages.llvm.dev nukeReferences ]; + ++ lib.optionals jitSupport [ llvmPackages.llvm.dev nukeReferences ] + ++ lib.optionals (atLeast "17") [ bison flex perl docbook_xml_dtd_45 docbook-xsl-nons libxslt ]; enableParallelBuilding = true; @@ -153,7 +154,8 @@ let ++ lib.optionals stdenv'.hostPlatform.isLinux [ "--with-pam" ] # This could be removed once the upstream issue is resolved: # https://postgr.es/m/flat/427c7c25-e8e1-4fc5-a1fb-01ceff185e5b%40technowledgy.de - ++ lib.optionals (stdenv'.hostPlatform.isDarwin && atLeast "16") [ "LDFLAGS_EX_BE=-Wl,-export_dynamic" ]; + ++ lib.optionals (stdenv'.hostPlatform.isDarwin && atLeast "16") [ "LDFLAGS_EX_BE=-Wl,-export_dynamic" ] + ++ lib.optionals (atLeast "17") [ "--without-perl" ]; patches = [ (if atLeast "16" then ./patches/relative-to-symlinks-16+.patch else ./patches/relative-to-symlinks.patch) @@ -166,7 +168,7 @@ let src = ./patches/locale-binary-path.patch; locale = "${if stdenv.hostPlatform.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; }) - + ] ++ lib.optionals (olderThan "17") [ # TODO: Remove this with the next set of minor releases (fetchpatch ( if atLeast "14" then { @@ -182,7 +184,7 @@ let hash = "sha256-L8/ns/fxTh2ayfDQXtBIKaArFhMd+v86UxVFWQdmzUw="; excludes = [ "doc/*" ]; }) - ) + ) ] ++ lib.optionals stdenv'.hostPlatform.isMusl ( # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 map fetchurl (lib.attrValues muslPatches) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b7d3dfb911546..435974b4cf08b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24867,12 +24867,14 @@ with pkgs; postgresql_14 postgresql_15 postgresql_16 + postgresql_17 postgresql_12_jit postgresql_13_jit postgresql_14_jit postgresql_15_jit postgresql_16_jit + postgresql_17_jit ; postgresql = postgresql_16; postgresql_jit = postgresql_16_jit; @@ -24882,12 +24884,14 @@ with pkgs; postgresql13Packages = recurseIntoAttrs postgresql_13.pkgs; postgresql14Packages = recurseIntoAttrs postgresql_14.pkgs; postgresql15Packages = recurseIntoAttrs postgresql_15.pkgs; + postgresql16Packages = recurseIntoAttrs postgresql_16.pkgs; + postgresql17Packages = recurseIntoAttrs postgresql_17.pkgs; postgresql12JitPackages = recurseIntoAttrs postgresql_12_jit.pkgs; postgresql13JitPackages = recurseIntoAttrs postgresql_13_jit.pkgs; postgresql14JitPackages = recurseIntoAttrs postgresql_14_jit.pkgs; postgresql15JitPackages = recurseIntoAttrs postgresql_15_jit.pkgs; postgresql16JitPackages = recurseIntoAttrs postgresql_16_jit.pkgs; - postgresql16Packages = postgresqlPackages; + postgresql17JitPackages = recurseIntoAttrs postgresql_17_jit.pkgs; postgresql_jdbc = callPackage ../development/java-modules/postgresql_jdbc { };