aboutsummaryrefslogtreecommitdiff
path: root/modules/pkgs/monitoringPlugins/default.nix
blob: 92a82ba728842dd5cf5b11098106dad54f12d134 (plain)
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, pkgs }:

stdenv.mkDerivation rec {
  version = "2.2";
  name = "monitoring-plugins-${version}";
  src = fetchurl {
    url = "https://github.com/monitoring-plugins/monitoring-plugins/archive/v${version}.tar.gz";
    sha256 = "0nq0ilnfmwka5ds9k3bkgqd9238cv1yfyik8xhqbvnkpc3nh1cfk";
  };

  buildInputs = with pkgs; [
    autoreconfHook bind.dnsutils fping libdbi libtap mariadb.client.dev
    openldap.dev openssh openssl.dev perl postgresql procps smbclient sudo
  ];

  doCheck = false; # tests are broken badly

  patches = [
    ./mysql_check_slave.patch
    ./test-str-format.patch
    ./check_mysql_MYSQL_PORT.patch
  ];

  configurePhase = ''
    ./configure \
      --prefix=$out \
      --disable-nls \
      --with-ping-command="/run/wrappers/bin/ping -n -U -w %d -c %d %s" \
      --with-ping6-command="/run/wrappers/bin/ping6 -n -U -w %d -c %d %s" \
      --with-trusted-path=/run/wrappers/bin:/run/current-system/sw/bin:/usr/bin
  '';
}