2017-01-23 07:54:11 +00:00
|
|
|
{ stdenv, fetchurl, openssh, openssl }:
|
2007-01-08 18:55:23 +00:00
|
|
|
|
2014-06-22 05:35:09 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "nagios-plugins-${version}";
|
2017-01-23 07:55:05 +00:00
|
|
|
version = "2.2.0";
|
2007-01-08 18:55:23 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-06-22 05:35:09 +01:00
|
|
|
url = "http://nagios-plugins.org/download/${name}.tar.gz";
|
2017-01-23 07:55:05 +00:00
|
|
|
sha256 = "074yia04py5y07sbgkvri10dv8nf41kqq1x6kmwqcix5vvm9qyy3";
|
2007-11-08 18:17:56 +00:00
|
|
|
};
|
|
|
|
|
2007-11-08 20:04:40 +00:00
|
|
|
# !!! 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=(
|
2017-02-15 10:05:50 +00:00
|
|
|
--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'
|
2007-11-08 20:04:40 +00:00
|
|
|
)
|
|
|
|
";
|
|
|
|
|
2007-11-12 16:45:47 +00:00
|
|
|
postInstall = "ln -s libexec $out/bin";
|
|
|
|
|
2014-06-22 05:35:09 +01:00
|
|
|
# !!! make openssh a runtime dependency only
|
2017-01-23 07:54:11 +00:00
|
|
|
buildInputs = [ openssh openssl ];
|
2007-11-08 20:20:21 +00:00
|
|
|
|
2007-11-08 18:17:56 +00:00
|
|
|
meta = {
|
2014-06-22 05:35:09 +01:00
|
|
|
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 ];
|
2007-01-08 18:55:23 +00:00
|
|
|
};
|
|
|
|
}
|