diff --git a/pkgs/servers/monitoring/nagios/default.nix b/pkgs/servers/monitoring/nagios/default.nix index 8a24e9dfaa41..dba063bb1069 100644 --- a/pkgs/servers/monitoring/nagios/default.nix +++ b/pkgs/servers/monitoring/nagios/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl, perl }: +{ stdenv, fetchurl, perl, gdSupport ? false +, gd ? null, libpng ? null, zlib ? null +}: stdenv.mkDerivation { name = "nagios-2.10"; @@ -9,7 +11,7 @@ stdenv.mkDerivation { }; patches = [./nagios.patch]; - buildInputs = [perl]; + buildInputs = [perl] ++ (if gdSupport then [gd libpng zlib] else []); buildFlags = "all"; installTargets = "install install-config"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ee6cf420d2b2..ad326c6cbc15 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2761,7 +2761,8 @@ rec { }; nagios = import ../servers/monitoring/nagios { - inherit fetchurl stdenv perl; + inherit fetchurl stdenv perl gd libpng zlib; + gdSupport = true; }; nagiosPluginsOfficial = import ../servers/monitoring/nagios/plugins/official {