* Build the Zabbix agent on other platforms.

svn path=/nixpkgs/trunk/; revision=20188
This commit is contained in:
Eelco Dolstra 2010-02-23 12:17:23 +00:00
parent 17c0e537e3
commit 3f9cb1d9d2

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib }:
assert stdenv.gcc.libc != null;
let
version = "1.8.1";
@ -11,6 +9,15 @@ let
sha256 = "0z4a5lbpgszc2vfg2hc30c1l3l1lbihinqx2sygxf9r5y9k7fj7g";
};
preConfigure =
''
substituteInPlace ./configure \
--replace " -static" "" \
${stdenv.lib.optionalString (stdenv.gcc.libc != null) ''
--replace /usr/include/iconv.h ${stdenv.gcc.libc}/include/iconv.h
''}
'';
in
{
@ -18,17 +25,10 @@ in
server = stdenv.mkDerivation {
name = "zabbix-${version}";
inherit src;
inherit src preConfigure;
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 =
@ -53,16 +53,10 @@ in
agent = stdenv.mkDerivation {
name = "zabbix-agent-${version}";
inherit src;
inherit src preConfigure;
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/;