diff --git a/pkgs/servers/monitoring/zabbix/default.nix b/pkgs/servers/monitoring/zabbix/default.nix index fa55b343c35..0e708df55f3 100644 --- a/pkgs/servers/monitoring/zabbix/default.nix +++ b/pkgs/servers/monitoring/zabbix/default.nix @@ -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/;