From 6346fed88fac0d9652df7385b206d29b0219faee Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Thu, 16 Aug 2018 11:56:48 +0300 Subject: Fix icinga2 2.9.x can't find its libraries Ref. https://github.com/Icinga/icinga2/issues/6548 --- modules/pkgs/icinga2/default.nix | 9 +++++++-- 1 file 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 -- cgit v1.2.3