2010-02-15 14:20:28 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib }:
|
2008-06-03 21:59:35 +00:00
|
|
|
|
2010-02-15 14:20:28 +00:00
|
|
|
let
|
2008-06-03 21:59:35 +00:00
|
|
|
|
2014-12-18 12:43:27 +00:00
|
|
|
version = "1.8.22";
|
2012-10-26 13:20:20 +00:00
|
|
|
|
2008-06-03 21:59:35 +00:00
|
|
|
src = fetchurl {
|
2010-02-15 14:20:28 +00:00
|
|
|
url = "mirror://sourceforge/zabbix/zabbix-${version}.tar.gz";
|
2014-12-18 12:43:27 +00:00
|
|
|
sha256 = "0cjj3c4j4b9sl3hgh1fck330z9q0gz2k68g227y0paal6k6f54g7";
|
2008-06-03 21:59:35 +00:00
|
|
|
};
|
|
|
|
|
2010-02-23 12:17:23 +00:00
|
|
|
preConfigure =
|
|
|
|
''
|
|
|
|
substituteInPlace ./configure \
|
|
|
|
--replace " -static" "" \
|
2014-12-17 18:11:30 +00:00
|
|
|
${stdenv.lib.optionalString (stdenv.cc.libc != null) ''
|
2016-08-31 21:28:32 +00:00
|
|
|
--replace /usr/include/iconv.h ${stdenv.lib.getDev stdenv.cc.libc}/include/iconv.h
|
2010-02-23 12:17:23 +00:00
|
|
|
''}
|
|
|
|
'';
|
|
|
|
|
2010-02-15 14:20:28 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
server = stdenv.mkDerivation {
|
|
|
|
name = "zabbix-${version}";
|
|
|
|
|
2010-02-23 12:17:23 +00:00
|
|
|
inherit src preConfigure;
|
2010-02-15 14:20:28 +00:00
|
|
|
|
2018-07-25 21:44:21 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-agent"
|
|
|
|
"--enable-server"
|
|
|
|
"--with-pgsql"
|
|
|
|
"--with-libcurl"
|
|
|
|
];
|
2010-02-15 14:20:28 +00:00
|
|
|
|
2017-09-05 21:26:13 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ postgresql curl openssl zlib ];
|
2010-02-15 14:20:28 +00:00
|
|
|
|
|
|
|
postInstall =
|
|
|
|
''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/zabbix
|
2010-02-15 14:20:28 +00:00
|
|
|
cp -prvd frontends/php $out/share/zabbix/php
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/zabbix/db/data
|
2010-02-15 14:20:28 +00:00
|
|
|
cp -prvd create/data/*.sql $out/share/zabbix/db/data
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/zabbix/db/schema
|
2010-02-15 14:20:28 +00:00
|
|
|
cp -prvd create/schema/*.sql $out/share/zabbix/db/schema
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "An enterprise-class open source distributed monitoring solution";
|
2018-01-05 19:42:46 +00:00
|
|
|
homepage = https://www.zabbix.com/;
|
2010-02-15 14:20:28 +00:00
|
|
|
license = "GPL";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
};
|
2012-10-26 13:20:20 +00:00
|
|
|
|
2010-02-15 14:20:28 +00:00
|
|
|
agent = stdenv.mkDerivation {
|
|
|
|
name = "zabbix-agent-${version}";
|
|
|
|
|
2010-02-23 12:17:23 +00:00
|
|
|
inherit src preConfigure;
|
2010-02-15 14:20:28 +00:00
|
|
|
|
2018-07-25 21:44:21 +00:00
|
|
|
configureFlags = [ "--enable-agent" ];
|
2010-02-15 14:20:28 +00:00
|
|
|
|
2015-06-10 11:00:11 +00:00
|
|
|
meta = with stdenv.lib; {
|
2010-02-15 14:20:28 +00:00
|
|
|
description = "An enterprise-class open source distributed monitoring solution (client-side agent)";
|
2018-01-05 19:42:46 +00:00
|
|
|
homepage = https://www.zabbix.com/;
|
2015-06-10 11:00:11 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.eelco ];
|
2016-09-01 17:39:33 +00:00
|
|
|
platforms = platforms.linux;
|
2010-02-15 14:20:28 +00:00
|
|
|
};
|
2008-06-03 21:59:35 +00:00
|
|
|
};
|
2012-10-26 13:20:20 +00:00
|
|
|
|
2008-06-03 21:59:35 +00:00
|
|
|
}
|