nixpkgs/pkgs/servers/monitoring/nagios/default.nix
Austin Seipp 6cfa38ce7d nagios: significant upgrades
- Upgrade Nagios Core to 4.x
 - Expose mainConfigFile and cgiConfigFile in module for finer
   configuration control.
 - Upgrade Plugins to 2.x
 - Remove default objectDefs, which users probably want to customize.
 - Systemd-ify Nagios module and simplify directory structure
 - Upgrade Nagios package with more modern patch, and ensure the
   statedir is set to /var/lib/nagios

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-06-22 00:22:10 -05:00

31 lines
900 B
Nix

{ stdenv, fetchurl, perl, php, gd, libpng, zlib }:
stdenv.mkDerivation {
name = "nagios-4.0.7";
src = fetchurl {
url = mirror://sourceforge/nagios/nagios-4.x/nagios-4.0.7/nagios-4.0.7.tar.gz;
sha256 = "1687qnbsag84r57y9745g2klypacfixd6gkzaj42lmzn0v8y27gg";
};
patches = [ ./nagios.patch ];
buildInputs = [ php perl gd libpng zlib ];
configureFlags = [ "--localstatedir=/var/lib/nagios" ];
buildFlags = "all";
# Do not create /var directories
preInstall = ''
substituteInPlace Makefile --replace '$(MAKE) install-basic' ""
'';
installTargets = "install install-config";
meta = {
description = "A host, service and network monitoring program";
homepage = http://www.nagios.org/;
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice relrod ];
};
}