Skip to content

Commit

Permalink
postgresql_17: init at 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangwalther committed Oct 25, 2024
1 parent c76e835 commit e01b63a
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 6 deletions.
4 changes: 4 additions & 0 deletions pkgs/servers/sql/postgresql/17.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import ./generic.nix {
version = "17.0";
hash = "sha256-fidhMcD91rYliNutmzuyS4w0mNUAkyjbpZrxboGRCd4=";
}
1 change: 1 addition & 0 deletions pkgs/servers/sql/postgresql/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ let
postgresql_14 = ./14.nix;
postgresql_15 = ./15.nix;
postgresql_16 = ./16.nix;
postgresql_17 = ./17.nix;
};

mkAttributes = jitSupport:
Expand Down
4 changes: 4 additions & 0 deletions pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

let
source = {
"17" = {
version = "1.7.0";
hash = "sha256-MNQMePDmGxC8OFIJuVJrhfgU566vkng00+tjeGpGKvs=";
};
"16" = {
version = "1.6.0";
hash = "sha256-lg7N0QblluTgtNo1tGZjirNJSyQXtcAEs9Jqd3zx0Sg=";
Expand Down
4 changes: 4 additions & 0 deletions pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions pkgs/servers/sql/postgresql/ext/pgaudit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

let
source = {
"17" = {
version = "17.0";
hash = "sha256-3ksq09wiudQPuBQI3dhEQi8IkXKLVIsPFgBnwLiicro=";
};
"16" = {
version = "16.0";
hash = "sha256-8+tGOl1U5y9Zgu+9O5UDDE4bec4B0JC/BQ6GLhHzQzc=";
Expand Down
12 changes: 7 additions & 5 deletions pkgs/servers/sql/postgresql/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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)
Expand All @@ -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 {
Expand All @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 { };

Expand Down

0 comments on commit e01b63a

Please sign in to comment.