diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2018-08-16 11:56:48 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2018-08-16 11:56:48 +0300 |
commit | 6346fed88fac0d9652df7385b206d29b0219faee (patch) | |
tree | 082101a89778a87db4924b149eee96c5d1ae6876 | |
parent | 4c064394231dba3562f9b9c82c4f40b84e099c4b (diff) | |
download | nixsap-6346fed88fac0d9652df7385b206d29b0219faee.tar.gz |
Fix icinga2 2.9.x can't find its libraries
Ref. https://github.com/Icinga/icinga2/issues/6548
-rw-r--r-- | modules/pkgs/icinga2/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/pkgs/icinga2/default.nix b/modules/pkgs/icinga2/default.nix index 0816fce..c7967f9 100644 --- a/modules/pkgs/icinga2/default.nix +++ b/modules/pkgs/icinga2/default.nix @@ -2,6 +2,7 @@ , bison, boost, cmake, flex , libedit, mariadb, postgresql , openssl, yajl, pkgconfig +, makeWrapper }: stdenv.mkDerivation rec { @@ -14,8 +15,8 @@ stdenv.mkDerivation rec { }; buildInputs = [ - bison boost cmake flex libedit mariadb.client openssl pkgconfig - postgresql yajl + bison boost cmake flex libedit makeWrapper mariadb.client openssl + pkgconfig postgresql yajl ]; patches = [ @@ -43,6 +44,10 @@ stdenv.mkDerivation rec { for s in $out/icinga2/etc/icinga2/scripts/* ; do substituteInPlace $s --replace /usr/bin/printf printf done + + wrapProgram $out/lib/icinga2/sbin/icinga2 \ + --prefix LD_LIBRARY_PATH : $out/lib/icinga2 + rm -vf $out/sbin/icinga2 ln -svf $out/lib/icinga2/sbin/icinga2 $out/sbin/icinga2 test -x $out/sbin/icinga2 |