forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nagiosPlugins.manubulon-snmp-plugins: init at 2.1.0-unstable-2024-03-13
- Loading branch information
1 parent
db10975
commit 40b94c2
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
pkgs/servers/monitoring/nagios-plugins/manubulon-snmp-plugins/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
fetchFromGitHub, | ||
lib, | ||
makeWrapper, | ||
manubulon-snmp-plugins, | ||
nix-update-script, | ||
perlPackages, | ||
stdenv, | ||
testers, | ||
}: | ||
stdenv.mkDerivation rec { | ||
pname = "manubulon-snmp-plugins"; | ||
version = "2.1.0-unstable-2024-03-13"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "SteScho"; | ||
repo = "manubulon-snmp"; | ||
rev = "1a5afb2486802034146277010d956eba9c2ad54b"; | ||
hash = "sha256-B5CCGMkNv1wGnLQIl0yiGTH2j5MOlj5+MrRqbLNIwhE="; | ||
}; | ||
|
||
buildInputs = with perlPackages; [ | ||
CryptDES | ||
CryptRijndael | ||
DigestHMAC | ||
DigestSHA1 | ||
GetoptLongDescriptive | ||
NetSNMP | ||
perl | ||
]; | ||
|
||
nativeBuildInputs = [ | ||
makeWrapper | ||
]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir --parents $out/bin | ||
install --mode=0755 plugins/*.pl $out/bin | ||
runHook postInstall | ||
''; | ||
|
||
postFixup = '' | ||
for f in $out/bin/* ; do | ||
wrapProgram $f --set PERL5LIB $PERL5LIB --set LC_ALL C | ||
done | ||
''; | ||
|
||
passthru = { | ||
updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; | ||
tests.version = testers.testVersion { | ||
package = manubulon-snmp-plugins; | ||
# Program returns status code 3 | ||
command = "check_snmp_int.pl --version || true"; | ||
version = builtins.head (lib.splitString "-" version); | ||
}; | ||
}; | ||
|
||
meta = with lib; { | ||
changelog = "https://github.com/SteScho/manubulon-snmp/releases/tag/v${version}"; | ||
description = "Set of Icinga/Nagios plugins to check hosts and hardware with the SNMP protocol"; | ||
homepage = "https://github.com/SteScho/manubulon-snmp"; | ||
license = with licenses; [ gpl2Only ]; | ||
platforms = platforms.unix; | ||
maintainers = with maintainers; [ jwillikers ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters