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>
This commit is contained in:
aszlig 2013-06-21 11:34:46 +02:00
parent f974573a5e
commit 60ba4485b1
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961
2 changed files with 13 additions and 5 deletions

View File

@ -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 ];

View File

@ -5912,9 +5912,7 @@ let
inherit fetchurl stdenv pkgconfig postgresql curl openssl zlib;
});
zabbix20 = recurseIntoAttrs (import ../servers/monitoring/zabbix/2.0.nix {
inherit fetchurl stdenv pkgconfig postgresql curl openssl zlib gettext;
});
zabbix20 = callPackage ../servers/monitoring/zabbix/2.0.nix { };
### OS-SPECIFIC