summary refs log tree commit diff
path: root/pkgs/servers/monitoring/zabbix/default.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2010-02-15 14:20:28 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2010-02-15 14:20:28 +0000
commit65aecdd00b5609bb2b0af1873d42b1727064d0d9 (patch)
tree42ea2d157b53dda7bf1f8765b21d65fcb2963a16 /pkgs/servers/monitoring/zabbix/default.nix
parent513d653d68a80f9bdd0cb9724643fdbea5646e4b (diff)
downloadnixpkgs-65aecdd00b5609bb2b0af1873d42b1727064d0d9.tar
nixpkgs-65aecdd00b5609bb2b0af1873d42b1727064d0d9.tar.gz
nixpkgs-65aecdd00b5609bb2b0af1873d42b1727064d0d9.tar.bz2
nixpkgs-65aecdd00b5609bb2b0af1873d42b1727064d0d9.tar.lz
nixpkgs-65aecdd00b5609bb2b0af1873d42b1727064d0d9.tar.xz
nixpkgs-65aecdd00b5609bb2b0af1873d42b1727064d0d9.tar.zst
nixpkgs-65aecdd00b5609bb2b0af1873d42b1727064d0d9.zip
* Zabbix updated to 1.8.1.
svn path=/nixpkgs/trunk/; revision=20009
Diffstat (limited to 'pkgs/servers/monitoring/zabbix/default.nix')
-rw-r--r--pkgs/servers/monitoring/zabbix/default.nix93
1 files changed, 66 insertions, 27 deletions
diff --git a/pkgs/servers/monitoring/zabbix/default.nix b/pkgs/servers/monitoring/zabbix/default.nix
index 0f8c90beb6e..6739beeb4cd 100644
--- a/pkgs/servers/monitoring/zabbix/default.nix
+++ b/pkgs/servers/monitoring/zabbix/default.nix
@@ -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 "");
-
-  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 ""; # */
-
-  meta = {
-    description = "An enterprise-class open source distributed monitoring solution";
-    homepage = http://www.zabbix.com/;
-    license = "GPL";
+in
+
+{
+
+  server = stdenv.mkDerivation {
+    name = "zabbix-${version}";
+
+    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;
+    };
   };
+  
 }