nixpkgs-suyu/pkgs/servers/monitoring/nagios/plugins/official-2.x.nix
Jörg Thalheim fd78ff23f7
replace ping6 with ping
reason: after the upgrade of iputils from 20151218 to 20161105
functionality of ping6 and tracepath6 was merged into ping and tracepath.

Ping is now mostly a drop-in replacment for ping6, except that selecting a
specific interface is done by encoding it into the address (ex.: fe80::1%eth0)
rather then specifing it with the `-I` flag.
2017-02-17 16:04:49 +01:00

36 lines
1.2 KiB
Nix

{ stdenv, fetchurl, openssh, openssl }:
stdenv.mkDerivation rec {
name = "nagios-plugins-${version}";
version = "2.2.0";
src = fetchurl {
url = "http://nagios-plugins.org/download/${name}.tar.gz";
sha256 = "074yia04py5y07sbgkvri10dv8nf41kqq1x6kmwqcix5vvm9qyy3";
};
# !!! Awful hack. Grrr... this of course only works on NixOS.
# Anyway the check that configure performs to figure out the ping
# syntax is totally impure, because it runs an actual ping to
# localhost (which won't work for ping6 if IPv6 support isn't
# configured on the build machine).
preConfigure= "
configureFlagsArray=(
--with-ping-command='/run/wrappers/bin/ping -4 -n -U -w %d -c %d %s'
--with-ping6-command='/run/wrappers/bin/ping -6 -n -U -w %d -c %d %s'
)
";
postInstall = "ln -s libexec $out/bin";
# !!! make openssh a runtime dependency only
buildInputs = [ openssh openssl ];
meta = {
description = "Official plugins for Nagios";
homepage = http://www.nagios.org/download/plugins;
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice relrod ];
};
}