@ -1,10 +1,11 @@
{ lib , stdenv , glibc , fetchurl , zlib , readline , libossp_uuid , openssl , libxml2 , makeWrapper , tzdata }:
{ lib , stdenv , glibc , fetchurl , zlib , readline , libossp_uuid , openssl , libxml2 , makeWrapper , tzdata , systemd }:
let
common = { version , sha256 , psqlSchema }:
let atLeast = lib . versionAtLeast version ; in stdenv . mkDerivation ( rec {
name = " p o s t g r e s q l - ${ version } " ;
inherit version ;
src = fetchurl {
url = " m i r r o r : / / p o s t g r e s q l / s o u r c e / v ${ version } / ${ name } . t a r . b z 2 " ;
@ -15,7 +16,7 @@ let
setOutputFlags = false ; # $out retains configureFlags :-/
buildInputs =
[ zlib readline openssl libxml2 makeWrapper ]
[ zlib readline openssl libxml2 makeWrapper systemd ]
++ lib . optionals ( ! stdenv . isDarwin ) [ libossp_uuid ] ;
enableParallelBuilding = true ;
@ -33,6 +34,7 @@ let
" - - s y s c o n f d i r = / e t c "
" - - l i b d i r = $ ( l i b ) / l i b "
" - - w i t h - s y s t e m - t z d a t a = ${ tzdata } / s h a r e / z o n e i n f o "
( lib . optionalString ( atLeast " 9 . 6 " && ! stdenv . isDarwin ) " - - w i t h - s y s t e m d " )
( if stdenv . isDarwin then " - - w i t h - u u i d = e 2 f s " else " - - w i t h - o s s p - u u i d " )
] ;