diff options
Diffstat (limited to 'modules/pkgs')
-rw-r--r-- | modules/pkgs/icinga2/default.nix | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/modules/pkgs/icinga2/default.nix b/modules/pkgs/icinga2/default.nix index 35f6ab1..54fdc00 100644 --- a/modules/pkgs/icinga2/default.nix +++ b/modules/pkgs/icinga2/default.nix @@ -1,18 +1,22 @@ { stdenv, fetchurl , bison, boost, cmake, flex -, libedit, mariadb, openssl, yajl +, libedit, mariadb, postgresql +, openssl, yajl, pkgconfig }: stdenv.mkDerivation rec { - version = "2.4.10"; + version = "2.8.2"; name = "icinga2-${version}"; src = fetchurl { url = "https://github.com/Icinga/icinga2/archive/v${version}.tar.gz"; - sha256 = "0pj2y24kgf17106903lnz9gmp5hb3irhafq8sp22qf1wa0q395n2"; + sha256 = "070mj6jg3jkzybwhs6v2g3hhfq34dfqhxs8nlqbn3446bj82122h"; }; - buildInputs = [ bison boost cmake flex libedit openssl yajl ]; + buildInputs = [ + bison boost cmake flex libedit mariadb.client openssl pkgconfig + postgresql yajl + ]; patches = [ ./check_mysql_slave.patch @@ -25,9 +29,7 @@ stdenv.mkDerivation rec { "-DICINGA2_GROUP=icinga" "-DICINGA2_RUNDIR=/run" "-DICINGA2_USER=icinga" - "-DICINGA2_WITH_PGSQL=OFF" "-DMYSQL_INCLUDE_DIR=${mariadb.client.dev}/include/mysql" - "-DMYSQL_LIB_DIR=${mariadb.client.out}/lib" ]; # XXX Without DESTDIR it tries to write to /icinga2 and /run: @@ -35,11 +37,18 @@ stdenv.mkDerivation rec { rm -rf tmp mkdir -p tmp make install DESTDIR=$(pwd)/tmp - mv tmp/$out $out - mv tmp/icinga2 $out/icinga2 - rm -rf $out/run + mv -v tmp/$out $out + mv -v tmp/icinga2 $out/icinga2 + rm -rvf $out/run for s in $out/icinga2/etc/icinga2/scripts/* ; do substituteInPlace $s --replace /usr/bin/printf printf done + rm -vf $out/sbin/icinga2 + ln -svf $out/lib/icinga2/sbin/icinga2 $out/sbin/icinga2 + test -x $out/sbin/icinga2 + ''; + + buildPhase = '' + make VERBOSE=1 ''; } |