mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
* Zabbix updated to 1.8.1.
svn path=/nixpkgs/trunk/; revision=20009
This commit is contained in:
parent
513d653d68
commit
65aecdd00b
2 changed files with 66 additions and 33 deletions
|
@ -1,34 +1,73 @@
|
|||
{stdenv, fetchurl, enableServer ? false, postgresql ? null, curl ? null}:
|
||||
{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "zabbix-1.4.6";
|
||||
let
|
||||
|
||||
version = "1.8.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/zabbix/zabbix-1.4.6.tar.gz;
|
||||
sha256 = "19xczaiprn820jnq9lhixdhd3d6ffkjk80l98lwxzrz2zc2s06n9";
|
||||
url = "mirror://sourceforge/zabbix/zabbix-${version}.tar.gz";
|
||||
sha256 = "0z4a5lbpgszc2vfg2hc30c1l3l1lbihinqx2sygxf9r5y9k7fj7g";
|
||||
};
|
||||
|
||||
configureFlags = "--enable-agent " +
|
||||
(if enableServer then ''
|
||||
--enable-server
|
||||
--with-pgsql
|
||||
--with-libcurl
|
||||
'' else "");
|
||||
in
|
||||
|
||||
buildInputs = stdenv.lib.optionals enableServer [postgresql curl];
|
||||
{
|
||||
|
||||
postInstall = if enableServer then ''
|
||||
ensureDir $out/share/zabbix
|
||||
cp -prvd frontends/php $out/share/zabbix/php
|
||||
ensureDir $out/share/zabbix/db/data
|
||||
cp -prvd create/data/*.sql $out/share/zabbix/db/data
|
||||
ensureDir $out/share/zabbix/db/schema
|
||||
cp -prvd create/schema/*.sql $out/share/zabbix/db/schema
|
||||
'' else ""; # */
|
||||
server = stdenv.mkDerivation {
|
||||
name = "zabbix-${version}";
|
||||
|
||||
meta = {
|
||||
description = "An enterprise-class open source distributed monitoring solution";
|
||||
homepage = http://www.zabbix.com/;
|
||||
license = "GPL";
|
||||
inherit src;
|
||||
|
||||
configureFlags = "--enable-agent --enable-server --with-pgsql --with-libcurl";
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
substituteInPlace ./configure \
|
||||
--replace " -static" "" \
|
||||
--replace /usr/include/iconv.h ${stdenv.gcc.libc}/include/iconv.h
|
||||
'';
|
||||
|
||||
buildInputs = [ pkgconfig postgresql curl openssl zlib ];
|
||||
|
||||
postInstall =
|
||||
''
|
||||
ensureDir $out/share/zabbix
|
||||
cp -prvd frontends/php $out/share/zabbix/php
|
||||
ensureDir $out/share/zabbix/db/data
|
||||
cp -prvd create/data/*.sql $out/share/zabbix/db/data
|
||||
ensureDir $out/share/zabbix/db/schema
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
agent = stdenv.mkDerivation {
|
||||
name = "zabbix-agent-${version}";
|
||||
|
||||
inherit src;
|
||||
|
||||
configureFlags = "--enable-agent";
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
substituteInPlace ./configure \
|
||||
--replace /usr/include/iconv.h ${stdenv.gcc.libc}/include/iconv.h
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "An enterprise-class open source distributed monitoring solution (client-side agent)";
|
||||
homepage = http://www.zabbix.com/;
|
||||
license = "GPL";
|
||||
maintainers = [ stdenv.lib.maintainers.eelco ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -5602,15 +5602,9 @@ let
|
|||
libXext utilmacros;
|
||||
};
|
||||
|
||||
zabbixAgent = import ../servers/monitoring/zabbix {
|
||||
inherit fetchurl stdenv;
|
||||
enableServer = false;
|
||||
};
|
||||
|
||||
zabbixServer = import ../servers/monitoring/zabbix {
|
||||
inherit fetchurl stdenv postgresql curl;
|
||||
enableServer = true;
|
||||
};
|
||||
zabbix = recurseIntoAttrs (import ../servers/monitoring/zabbix {
|
||||
inherit fetchurl stdenv pkgconfig postgresql curl openssl zlib;
|
||||
});
|
||||
|
||||
|
||||
### OS-SPECIFIC
|
||||
|
|
Loading…
Reference in a new issue