diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 0badde7a4df3..71bb6e20f3f5 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -165,6 +165,12 @@ 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 (stdenv'.hostPlatform.isDarwin && atLeast "17") [ + # TODO: Remove this with the next set of minor releases + (fetchpatch ({ + url = "https://github.com/postgres/postgres/commit/0a883a067bd78f0ff0607afb18c4f783ac764504.patch"; + hash = "sha256-F3zCaar6w6bwQDno7Tkg7ZbPJ+rhgi8/2NSvFakzQek="; + })) ] ++ lib.optionals (olderThan "17") [ # TODO: Remove this with the next set of minor releases (fetchpatch (