summary refs log tree commit diff
path: root/pkgs/servers/monitoring/nagios/plugins/official/default.nix
blob: c466813b23b0bc43f66546e4287d324214f47de5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{stdenv, fetchurl, openssh}:

stdenv.mkDerivation {
  name = "nagios-plugins-1.4.10";

  src = fetchurl {
    url = https://www.monitoring-plugins.org/download/nagios-plugins-1.4.10.tar.gz;
    sha256 = "0vm7sjiygxbfc5vbsi1g0dakpvynfzi86fhqx4yxd61brn0g8ghr";
  };

  # !!! 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='/var/setuid-wrappers/ping -n -U -w %d -c %d %s'
      --with-ping6-command='/var/setuid-wrappers/ping6 -n -U -w %d -c %d %s'
    )
  ";

  postInstall = "ln -s libexec $out/bin";

  buildInputs = [openssh]; # !!! make openssh a runtime dependency only

  meta = {
    description = "Plugins for Nagios";
    homepage = http://www.monitoring-plugins.org;
    license = "GPL";
  };
}