about summary refs log tree commit diff
path: root/pkgs/servers/monitoring/zabbix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2013-06-21 11:34:46 +0200
committeraszlig <aszlig@redmoonstudios.org>2013-06-21 12:17:56 +0200
commit60ba4485b11460fc75e1acda3c0d56a7ecf1a398 (patch)
treebb5890ba6988c3e213aa9df375afaec90db9ed7c /pkgs/servers/monitoring/zabbix
parentf974573a5e91b8d4b92a695c4c355990f41f3b25 (diff)
downloadnixlib-60ba4485b11460fc75e1acda3c0d56a7ecf1a398.tar
nixlib-60ba4485b11460fc75e1acda3c0d56a7ecf1a398.tar.gz
nixlib-60ba4485b11460fc75e1acda3c0d56a7ecf1a398.tar.bz2
nixlib-60ba4485b11460fc75e1acda3c0d56a7ecf1a398.tar.lz
nixlib-60ba4485b11460fc75e1acda3c0d56a7ecf1a398.tar.xz
nixlib-60ba4485b11460fc75e1acda3c0d56a7ecf1a398.tar.zst
nixlib-60ba4485b11460fc75e1acda3c0d56a7ecf1a398.zip
zabbix2: Add optional XMPP support using iksemel.
This uses recurseForDerivations directly after using callPackage magic to ensure
that the input attributes can be overriden *and* nix-env shows the package as in
recurseIntoAttrs.

The reason for making this optional is because there probably is only a minority
of people who want to use XMPP and we don't want to introduce an additional
dependency for the majority, do we?

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/servers/monitoring/zabbix')
-rw-r--r--pkgs/servers/monitoring/zabbix/2.0.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/servers/monitoring/zabbix/2.0.nix b/pkgs/servers/monitoring/zabbix/2.0.nix
index 5131e8a2e42e..fef5010218cc 100644
--- a/pkgs/servers/monitoring/zabbix/2.0.nix
+++ b/pkgs/servers/monitoring/zabbix/2.0.nix
@@ -1,4 +1,7 @@
-{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib, gettext }:
+{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib, gettext
+, enableJabber ? false, iksemel ? null }:
+
+assert enableJabber -> iksemel != null;
 
 let
 
@@ -21,13 +24,20 @@ let
 in
 
 {
+  recurseForDerivations = true;
 
   server = stdenv.mkDerivation {
     name = "zabbix-${version}";
 
     inherit src preConfigure;
 
-    configureFlags = "--enable-agent --enable-server --with-postgresql --with-libcurl --with-gettext";
+    configureFlags = [
+      "--enable-agent"
+      "--enable-server"
+      "--with-postgresql"
+      "--with-libcurl"
+      "--with-gettext"
+    ] ++ stdenv.lib.optional enableJabber "--with-jabber=${iksemel}";
 
     buildInputs = [ pkgconfig postgresql curl openssl zlib ];