1 { lib, stdenv, fetchFromGitHub, fetchurl, autoreconfHook, makeWrapper
2 , perlPackages, coreutils, gnused, gnugrep }:
5 glplugin = fetchFromGitHub {
8 rev = "ef3107f01afe55fad5452e64ac5bbea00b18a8d5";
9 sha256 = "047fwrycsl2vmpi4wl46fs6f8y191d6qc9ms5rvmrj1dm2r828ws";
12 generic = { pname, version, sha256, description, buildInputs, ... }:
14 inherit pname version;
17 url = "https://labs.consol.de/assets/downloads/nagios/${pname}-${version}.tar.gz";
21 buildInputs = [ perlPackages.perl ] ++ buildInputs;
23 nativeBuildInputs = [ autoreconfHook makeWrapper ];
25 prePatch = with lib; ''
27 ln -s ${glplugin} GLPlugin
28 substituteInPlace plugins-scripts/Makefile.am \
29 --replace /bin/cat ${getBin coreutils}/bin/cat \
30 --replace /bin/echo ${getBin coreutils}/bin/echo \
31 --replace /bin/grep ${getBin gnugrep}/bin/grep \
32 --replace /bin/sed ${getBin gnused}/bin/sed
36 test -d $out/libexec && ln -sr $out/libexec $out/bin
40 for f in $out/bin/* ; do
41 wrapProgram $f --prefix PERL5LIB : $PERL5LIB
46 homepage = "https://labs.consol.de/";
47 license = licenses.gpl2;
48 maintainers = with maintainers; [ peterhoeg ];
54 check-mssql-health = generic {
55 pname = "check_mssql_health";
57 sha256 = "12z0b3c2p18viy7s93r6bbl8fvgsqh80136d07118qhxshp1pwxg";
58 description = "Check plugin for Microsoft SQL Server";
59 buildInputs = [ perlPackages.DBDsybase ];
62 check-nwc-health = generic {
63 pname = "check_nwc_health";
65 sha256 = "092rhaqnk3403z0y60x38vgh65gcia3wrd6gp8mr7wszja38kxv2";
66 description = "Check plugin for network equipment";
67 buildInputs = [ perlPackages.NetSNMP ];
70 check-ups-health = generic {
71 pname = "check_ups_health";
73 sha256 = "0qc2aglppwr9ms4p53kh9nr48625sqrbn46xs0k9rx5sv8hil9hm";
74 description = "Check plugin for UPSs";
75 buildInputs = [ perlPackages.NetSNMP ];