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