check-{ups,nwc}-health: update to release versions (#40541)
This commit is contained in:
@@ -1,25 +1,24 @@
|
|||||||
{ stdenv, fetchFromGitHub, buildPerlPackage, autoreconfHook, makeWrapper
|
{ stdenv, fetchFromGitHub, fetchurl, buildPerlPackage, autoreconfHook, makeWrapper
|
||||||
, perl, NetSNMP, coreutils, gnused, gnugrep }:
|
, perl, NetSNMP, coreutils, gnused, gnugrep }:
|
||||||
|
|
||||||
let
|
let
|
||||||
owner = "lausser";
|
|
||||||
|
|
||||||
glplugin = fetchFromGitHub {
|
glplugin = fetchFromGitHub {
|
||||||
|
owner = "lausser";
|
||||||
repo = "GLPlugin";
|
repo = "GLPlugin";
|
||||||
rev = "b92a261ca4bf84e5b20d3025cc9a31ade03c474b";
|
rev = "e8e1a2907a54435c932b3e6c584ba1d679754849";
|
||||||
sha256 = "0kflnmpjmklq8fy2vf2h8qyvaiznymdi09z2h5qscrfi51xc9gmh";
|
sha256 = "0wb55a9pmgbilfffx0wkiikg9830qd66j635ypczqp4basslpq5b";
|
||||||
inherit owner;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
generic = { pname, version, rev, sha256, description, ... } @ attrs:
|
generic = { pname, version, sha256, description, ... } @ attrs:
|
||||||
let
|
let
|
||||||
attrs' = builtins.removeAttrs attrs [ "pname" "version" "rev" "sha256"];
|
attrs' = builtins.removeAttrs attrs [ "pname" "version" "rev" "sha256"];
|
||||||
|
name' = "${stdenv.lib.replaceStrings [ "-" ] [ "_" ] "${pname}"}-${version}";
|
||||||
in perl.stdenv.mkDerivation rec {
|
in perl.stdenv.mkDerivation rec {
|
||||||
name = stdenv.lib.replaceStrings [ "-" ] [ "_" ] "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchurl {
|
||||||
repo = pname;
|
url = "https://labs.consol.de/assets/downloads/nagios/${name'}.tar.gz";
|
||||||
inherit owner rev sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ perl NetSNMP ];
|
buildInputs = [ perl NetSNMP ];
|
||||||
@@ -27,7 +26,8 @@ let
|
|||||||
nativeBuildInputs = [ autoreconfHook makeWrapper ];
|
nativeBuildInputs = [ autoreconfHook makeWrapper ];
|
||||||
|
|
||||||
prePatch = with stdenv.lib; ''
|
prePatch = with stdenv.lib; ''
|
||||||
ln -s ${glplugin}/* GLPlugin
|
rm -rf GLPlugin
|
||||||
|
ln -s ${glplugin} GLPlugin
|
||||||
substituteInPlace plugins-scripts/Makefile.am \
|
substituteInPlace plugins-scripts/Makefile.am \
|
||||||
--replace /bin/cat ${getBin coreutils}/bin/cat \
|
--replace /bin/cat ${getBin coreutils}/bin/cat \
|
||||||
--replace /bin/echo ${getBin coreutils}/bin/echo \
|
--replace /bin/echo ${getBin coreutils}/bin/echo \
|
||||||
@@ -56,17 +56,15 @@ let
|
|||||||
in {
|
in {
|
||||||
check-nwc-health = generic {
|
check-nwc-health = generic {
|
||||||
pname = "check_nwc_health";
|
pname = "check_nwc_health";
|
||||||
version = "20170804";
|
version = "7.0.1.3";
|
||||||
rev = "e959b412b5cf027c82a446668e026214fdcf8df3";
|
sha256 = "0rgd6zgd7kplx3z72n8zbzwkh8vnd83361sk9ibh6ng78sds1sl5";
|
||||||
sha256 = "11l74xw62g15rqrbf9ff2bfd5iw159gwhhgbkxwdqi8sp9j6navk";
|
|
||||||
description = "Check plugin for network equipment.";
|
description = "Check plugin for network equipment.";
|
||||||
};
|
};
|
||||||
|
|
||||||
check-ups-health = generic {
|
check-ups-health = generic {
|
||||||
pname = "check_ups_health";
|
pname = "check_ups_health";
|
||||||
version = "20170804";
|
version = "2.8.2.2";
|
||||||
rev = "32a8a359ea46ec0d6f3b7aea19ddedaad63b04b9";
|
sha256 = "1gc2wjsymay2vk5ywc1jj9cvrbhs0fs851x8l4nc75df2g75v521";
|
||||||
sha256 = "05na48dxfxrg0i9185j1ck2795p0rw1zwcs8ra0f14cm0qw0lp4l";
|
|
||||||
description = "Check plugin for UPSs.";
|
description = "Check plugin for UPSs.";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user