postgresql: Build with icu support
This commit is contained in:
parent
1f739a8810
commit
acc45d8f4f
pkgs/servers/sql/postgresql
|
@ -1,9 +1,14 @@
|
||||||
{ lib, stdenv, glibc, fetchurl, zlib, readline, libossp_uuid, openssl, libxml2, makeWrapper, tzdata, systemd }:
|
{ lib, stdenv, glibc, fetchurl, zlib, readline, libossp_uuid, openssl, libxml2, makeWrapper, tzdata, systemd, icu, pkgconfig }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
common = { version, sha256, psqlSchema }:
|
common = { version, sha256, psqlSchema }:
|
||||||
let atLeast = lib.versionAtLeast version; in stdenv.mkDerivation (rec {
|
let
|
||||||
|
atLeast = lib.versionAtLeast version;
|
||||||
|
|
||||||
|
# Build with ICU by default on versions that support it
|
||||||
|
icuEnabled = atLeast "10";
|
||||||
|
in stdenv.mkDerivation (rec {
|
||||||
name = "postgresql-${version}";
|
name = "postgresql-${version}";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
|
@ -17,9 +22,12 @@ let
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ zlib readline openssl libxml2 makeWrapper ]
|
[ zlib readline openssl libxml2 makeWrapper ]
|
||||||
|
++ lib.optionals icuEnabled [ icu ]
|
||||||
++ lib.optionals (atLeast "9.6" && !stdenv.isDarwin) [ systemd ]
|
++ lib.optionals (atLeast "9.6" && !stdenv.isDarwin) [ systemd ]
|
||||||
++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ];
|
++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ];
|
||||||
|
|
||||||
|
nativeBuildInputs = lib.optionals icuEnabled [ pkgconfig ];
|
||||||
|
|
||||||
enableParallelBuilding = !stdenv.isDarwin;
|
enableParallelBuilding = !stdenv.isDarwin;
|
||||||
|
|
||||||
makeFlags = [ "world" ];
|
makeFlags = [ "world" ];
|
||||||
|
@ -37,7 +45,7 @@ let
|
||||||
"--with-system-tzdata=${tzdata}/share/zoneinfo"
|
"--with-system-tzdata=${tzdata}/share/zoneinfo"
|
||||||
(lib.optionalString (atLeast "9.6" && !stdenv.isDarwin) "--with-systemd")
|
(lib.optionalString (atLeast "9.6" && !stdenv.isDarwin) "--with-systemd")
|
||||||
(if stdenv.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid")
|
(if stdenv.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid")
|
||||||
];
|
] ++ lib.optionals icuEnabled [ "--with-icu" ];
|
||||||
|
|
||||||
patches =
|
patches =
|
||||||
[ (if atLeast "9.4" then ./disable-resolve_symlinks-94.patch else ./disable-resolve_symlinks.patch)
|
[ (if atLeast "9.4" then ./disable-resolve_symlinks-94.patch else ./disable-resolve_symlinks.patch)
|
||||||
|
|
Loading…
Reference in New Issue