15 stdenv.mkDerivation rec {
19 src = fetchFromGitHub {
20 owner = "NagiosEnterprises";
22 rev = "refs/tags/nagios-${version}";
23 hash = "sha256-+U2k3w3Yr0qZjHwjRpKZVucB3a35PSZr1Sqa8k0ssq8=";
26 patches = [ ./nagios.patch ];
27 nativeBuildInputs = [ unzip ];
39 "--localstatedir=/var/lib/nagios"
40 "--with-ssl=${openssl.dev}"
41 "--with-ssl-inc=${openssl.dev}/include"
42 "--with-ssl-lib=${lib.getLib openssl}/lib"
45 buildFlags = [ "all" ];
47 # Do not create /var directories
49 substituteInPlace Makefile --replace '$(MAKE) install-basic' ""
51 installTargets = "install install-config";
53 # don't make default files use hardcoded paths to commands
54 sed -i 's@command_line *[^ ]*/\([^/]*\) @command_line \1 @' $out/etc/objects/commands.cfg
55 sed -i 's@/usr/bin/@@g' $out/etc/objects/commands.cfg
56 sed -i 's@/bin/@@g' $out/etc/objects/commands.cfg
61 inherit (nixosTests) nagios;
63 updateScript = nix-update-script {
64 extraArgs = [ "--version-regex" "nagios-(.*)" ];
69 description = "A host, service and network monitoring program";
70 homepage = "https://www.nagios.org/";
71 changelog = "https://github.com/NagiosEnterprises/nagioscore/blob/nagios-${version}/Changelog";
72 license = lib.licenses.gpl2;
73 platforms = lib.platforms.linux;
74 mainProgram = "nagios";
75 maintainers = with lib.maintainers; [ immae thoughtpolice relrod anthonyroussel ];