2010-02-15 14:20:28 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib }:
|
2008-06-03 22:59:35 +01:00
|
|
|
|
2010-02-15 14:20:28 +00:00
|
|
|
let
|
2008-06-03 22:59:35 +01:00
|
|
|
|
2014-12-18 12:43:27 +00:00
|
|
|
version = "1.8.22";
|
2012-10-26 14:20:20 +01:00
|
|
|
|
2008-06-03 22:59:35 +01: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 22:59:35 +01: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 22:28:32 +01: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
|
|
|
|
|
|
|
configureFlags = "--enable-agent --enable-server --with-pgsql --with-libcurl";
|
|
|
|
|
2017-09-05 22:26:13 +01: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 14:20:20 +01: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
|
|
|
|
|
|
|
configureFlags = "--enable-agent";
|
|
|
|
|
2015-06-10 12:00:11 +01: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 12:00:11 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.eelco ];
|
2016-09-01 18:39:33 +01:00
|
|
|
platforms = platforms.linux;
|
2010-02-15 14:20:28 +00:00
|
|
|
};
|
2008-06-03 22:59:35 +01:00
|
|
|
};
|
2012-10-26 14:20:20 +01:00
|
|
|
|
2008-06-03 22:59:35 +01:00
|
|
|
}
|