@ -1,7 +1,10 @@
{ stdenv , fetchurl , openssl , bison , flex , pam , zlib , usePAM ? stdenv . isLinux
, buildPlatform , hostPlatform } :
let useSSL = ( openssl != null ) ;
isCross = ( buildPlatform != hostPlatform ) ; in
{ stdenv
, fetchurl , bison , flex
, zlib
, usePAM ? stdenv . hostPlatform . isLinux , pam
, useSSL ? true , openssl
} :
stdenv . mkDerivation rec {
name = " m o n i t - 5 . 2 5 . 2 " ;
@ -15,15 +18,18 @@ stdenv.mkDerivation rec {
stdenv . lib . optionals useSSL [ openssl ] ++
stdenv . lib . optionals usePAM [ pam ] ;
configureFlags =
if useSSL then [
configureFlags = [
( stdenv . lib . withFeature usePAM " p a m " )
] ++ ( if useSSL then [
" - - w i t h - s s l - i n c l - d i r = ${ openssl . dev } / i n c l u d e "
" - - w i t h - s s l - l i b - d i r = ${ openssl . out } / l i b "
] else [ " - - w i t h o u t - s s l " ] ++
stdenv . lib . optionals ( ! usePAM ) [ " - - w i t h o u t - p a m " ] ++
] else [
" - - w i t h o u t - s s l "
] ) ++ stdenv . lib . optionals ( stdenv . hostPlatform != stdenv . buildPlatform ) [
# will need to check both these are true for musl
stdenv . lib . optionals isCross [ " l i b m o n i t _ c v _ s e t j m p _ a v a i l a b l e = y e s "
" l i b m o n i t _ c v _ v s n p r i n t f _ c 9 9 _ c o n f o r m a n t = y e s " ] ;
" l i b m o n i t _ c v _ s e t j m p _ a v a i l a b l e = y e s "
" l i b m o n i t _ c v _ v s n p r i n t f _ c 9 9 _ c o n f o r m a n t = y e s "
] ;
meta = {
homepage = http://mmonit.com/monit/ ;