aboutsummaryrefslogtreecommitdiff
path: root/modules/pkgs
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2018-04-02 11:48:18 +0300
committerIgor Pashev <pashev.igor@gmail.com>2018-04-02 11:48:21 +0300
commitb74fbbf564d822f0b1ec61e86f09f594b7e7698b (patch)
tree1b1e52d800dbc796e0df8d5b45f7a1b37d67641f /modules/pkgs
parent0040377b063341292f8d9e352bc6a53cdfef8f3e (diff)
downloadnixsap-b74fbbf564d822f0b1ec61e86f09f594b7e7698b.tar.gz
(* BREAKING *) icinga2: 2.4.10 -> 2.8.2
Breaking because of MySQL schema changes, icinga2 does not support unattended migrations. Added support for PostgreSQL.
Diffstat (limited to 'modules/pkgs')
-rw-r--r--modules/pkgs/icinga2/default.nix27
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
'';
}