* Build the Zabbix agent on other platforms.

svn path=/nixpkgs/trunk/; revision=20188

+11 -17
+11 -17
pkgs/servers/monitoring/zabbix/default.nix
··· 1 1 { stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib }: 2 2 3 - assert stdenv.gcc.libc != null; 4 - 5 3 let 6 4 7 5 version = "1.8.1"; ··· 11 9 sha256 = "0z4a5lbpgszc2vfg2hc30c1l3l1lbihinqx2sygxf9r5y9k7fj7g"; 12 10 }; 13 11 12 + preConfigure = 13 + '' 14 + substituteInPlace ./configure \ 15 + --replace " -static" "" \ 16 + ${stdenv.lib.optionalString (stdenv.gcc.libc != null) '' 17 + --replace /usr/include/iconv.h ${stdenv.gcc.libc}/include/iconv.h 18 + ''} 19 + ''; 20 + 14 21 in 15 22 16 23 { ··· 18 25 server = stdenv.mkDerivation { 19 26 name = "zabbix-${version}"; 20 27 21 - inherit src; 28 + inherit src preConfigure; 22 29 23 30 configureFlags = "--enable-agent --enable-server --with-pgsql --with-libcurl"; 24 31 25 - preConfigure = 26 - '' 27 - substituteInPlace ./configure \ 28 - --replace " -static" "" \ 29 - --replace /usr/include/iconv.h ${stdenv.gcc.libc}/include/iconv.h 30 - ''; 31 - 32 32 buildInputs = [ pkgconfig postgresql curl openssl zlib ]; 33 33 34 34 postInstall = ··· 53 53 agent = stdenv.mkDerivation { 54 54 name = "zabbix-agent-${version}"; 55 55 56 - inherit src; 56 + inherit src preConfigure; 57 57 58 58 configureFlags = "--enable-agent"; 59 - 60 - preConfigure = 61 - '' 62 - substituteInPlace ./configure \ 63 - --replace /usr/include/iconv.h ${stdenv.gcc.libc}/include/iconv.h 64 - ''; 65 59 66 60 meta = { 67 61 description = "An enterprise-class open source distributed monitoring solution (client-side agent)";