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