summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorAlexey Shmalko <rasen.dubi@gmail.com>2018-12-10 01:52:54 +0200
committerGitHub <noreply@github.com>2018-12-10 01:52:54 +0200
commitef966c1952c3373cb9cbb19859a72564a7b59b99 (patch)
tree46201c3a88f269d1b076aaeef4423ea8fb6db615 /pkgs/servers
parentd81439db9b1611191370b1728f072d15d68e3b72 (diff)
parentacc45d8f4fc375f841a034da5f91f6b0dc96f59c (diff)
downloadnixpkgs-ef966c1952c3373cb9cbb19859a72564a7b59b99.tar
nixpkgs-ef966c1952c3373cb9cbb19859a72564a7b59b99.tar.gz
nixpkgs-ef966c1952c3373cb9cbb19859a72564a7b59b99.tar.bz2
nixpkgs-ef966c1952c3373cb9cbb19859a72564a7b59b99.tar.lz
nixpkgs-ef966c1952c3373cb9cbb19859a72564a7b59b99.tar.xz
nixpkgs-ef966c1952c3373cb9cbb19859a72564a7b59b99.tar.zst
nixpkgs-ef966c1952c3373cb9cbb19859a72564a7b59b99.zip
Merge pull request #51719 from marsam/postgresql-build-icu-support
postgresql: Build with icu support
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/sql/postgresql/default.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix
index 6100cb2d1d1..8c82385c1d8 100644
--- a/pkgs/servers/sql/postgresql/default.nix
+++ b/pkgs/servers/sql/postgresql/default.nix
@@ -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
 
   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}";
     inherit version;
 
@@ -17,9 +22,12 @@ let
 
     buildInputs =
       [ zlib readline openssl libxml2 makeWrapper ]
+      ++ lib.optionals icuEnabled [ icu ]
       ++ lib.optionals (atLeast "9.6" && !stdenv.isDarwin) [ systemd ]
       ++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ];
 
+    nativeBuildInputs = lib.optionals icuEnabled [ pkgconfig ];
+
     enableParallelBuilding = !stdenv.isDarwin;
 
     makeFlags = [ "world" ];
@@ -37,7 +45,7 @@ let
       "--with-system-tzdata=${tzdata}/share/zoneinfo"
       (lib.optionalString (atLeast "9.6" && !stdenv.isDarwin) "--with-systemd")
       (if stdenv.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid")
-    ];
+    ] ++ lib.optionals icuEnabled [ "--with-icu" ];
 
     patches =
       [ (if atLeast "9.4" then ./disable-resolve_symlinks-94.patch else ./disable-resolve_symlinks.patch)