2018-02-20 08:40:39 -08:00
|
|
|
{stdenv, fetchurl, openssl, bison, flex, pam, zlib, usePAM ? stdenv.isLinux
|
|
|
|
, buildPlatform, hostPlatform }:
|
|
|
|
let useSSL = (openssl != null);
|
|
|
|
isCross = ( buildPlatform != hostPlatform ) ; in
|
2014-05-04 00:51:10 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2018-02-27 06:16:55 -08:00
|
|
|
name = "monit-5.25.1";
|
2016-09-24 00:42:42 -07:00
|
|
|
|
2014-05-04 00:51:10 -07:00
|
|
|
src = fetchurl {
|
|
|
|
url = "${meta.homepage}dist/${name}.tar.gz";
|
2018-02-27 06:16:55 -08:00
|
|
|
sha256 = "1g417cf6j0v6z233a3625fw1cxsh45xql7ag83jz2988n772ap2b";
|
2014-05-04 00:51:10 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ bison flex ];
|
2018-02-20 08:40:39 -08:00
|
|
|
buildInputs = [ zlib.dev ] ++
|
|
|
|
stdenv.lib.optionals useSSL [ openssl ] ++
|
|
|
|
stdenv.lib.optionals usePAM [ pam ];
|
2014-05-04 00:51:10 -07:00
|
|
|
|
2018-02-20 08:40:39 -08:00
|
|
|
configureFlags =
|
|
|
|
if useSSL then [
|
|
|
|
"--with-ssl-incl-dir=${openssl.dev}/include"
|
|
|
|
"--with-ssl-lib-dir=${openssl.out}/lib"
|
|
|
|
] else [ "--without-ssl" ] ++
|
|
|
|
stdenv.lib.optionals (! usePAM) [ "--without-pam" ] ++
|
|
|
|
# will need to check both these are true for musl
|
|
|
|
stdenv.lib.optionals isCross [ "libmonit_cv_setjmp_available=yes"
|
|
|
|
"libmonit_cv_vsnprintf_c99_conformant=yes"];
|
2009-08-26 09:22:20 -07:00
|
|
|
|
|
|
|
meta = {
|
2014-05-04 00:51:10 -07:00
|
|
|
homepage = http://mmonit.com/monit/;
|
2009-08-26 09:22:20 -07:00
|
|
|
description = "Monitoring system";
|
2014-05-04 00:51:10 -07:00
|
|
|
license = stdenv.lib.licenses.agpl3;
|
2014-07-22 14:45:18 -07:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ raskin wmertens ];
|
2016-08-02 10:50:55 -07:00
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2009-08-26 09:22:20 -07:00
|
|
|
};
|
|
|
|
}
|