Skip to content
Permalink
Browse files

check-{ups,nwc}-health: update to release versions

  • Loading branch information
peterhoeg committed May 14, 2018
1 parent 6db7f92 commit 70bf02026c248822934191633bd931e4cd9ba8ad
Showing with 16 additions and 18 deletions.
  1. +16 −18 pkgs/servers/monitoring/plugins/labs_consol_de.nix
@@ -1,33 +1,33 @@
{ stdenv, fetchFromGitHub, buildPerlPackage, autoreconfHook, makeWrapper
{ stdenv, fetchFromGitHub, fetchurl, buildPerlPackage, autoreconfHook, makeWrapper
, perl, NetSNMP, coreutils, gnused, gnugrep }:

let
owner = "lausser";

glplugin = fetchFromGitHub {
owner = "lausser";
repo = "GLPlugin";
rev = "b92a261ca4bf84e5b20d3025cc9a31ade03c474b";
sha256 = "0kflnmpjmklq8fy2vf2h8qyvaiznymdi09z2h5qscrfi51xc9gmh";
inherit owner;
rev = "e8e1a2907a54435c932b3e6c584ba1d679754849";
sha256 = "0wb55a9pmgbilfffx0wkiikg9830qd66j635ypczqp4basslpq5b";
};

generic = { pname, version, rev, sha256, description, ... } @ attrs:
generic = { pname, version, sha256, description, ... } @ attrs:
let
attrs' = builtins.removeAttrs attrs [ "pname" "version" "rev" "sha256"];
name' = "${stdenv.lib.replaceStrings [ "-" ] [ "_" ] "${pname}"}-${version}";
in perl.stdenv.mkDerivation rec {
name = stdenv.lib.replaceStrings [ "-" ] [ "_" ] "${pname}-${version}";
name = "${pname}-${version}";

src = fetchFromGitHub {
repo = pname;
inherit owner rev sha256;
src = fetchurl {
url = "https://labs.consol.de/assets/downloads/nagios/${name'}.tar.gz";
inherit sha256;
};

buildInputs = [ perl NetSNMP ];

nativeBuildInputs = [ autoreconfHook makeWrapper ];

prePatch = with stdenv.lib; ''
ln -s ${glplugin}/* GLPlugin
rm -rf GLPlugin
ln -s ${glplugin} GLPlugin
substituteInPlace plugins-scripts/Makefile.am \
--replace /bin/cat ${getBin coreutils}/bin/cat \
--replace /bin/echo ${getBin coreutils}/bin/echo \
@@ -56,17 +56,15 @@ let
in {
check-nwc-health = generic {
pname = "check_nwc_health";
version = "20170804";
rev = "e959b412b5cf027c82a446668e026214fdcf8df3";
sha256 = "11l74xw62g15rqrbf9ff2bfd5iw159gwhhgbkxwdqi8sp9j6navk";
version = "7.0.1.3";
sha256 = "0rgd6zgd7kplx3z72n8zbzwkh8vnd83361sk9ibh6ng78sds1sl5";
description = "Check plugin for network equipment.";
};

check-ups-health = generic {
pname = "check_ups_health";
version = "20170804";
rev = "32a8a359ea46ec0d6f3b7aea19ddedaad63b04b9";
sha256 = "05na48dxfxrg0i9185j1ck2795p0rw1zwcs8ra0f14cm0qw0lp4l";
version = "2.8.2.2";
sha256 = "1gc2wjsymay2vk5ywc1jj9cvrbhs0fs851x8l4nc75df2g75v521";
description = "Check plugin for UPSs.";
};
}

0 comments on commit 70bf020

Please sign in to comment.
You can’t perform that action at this time.