28 binPath = lib.makeBinPath [
39 mailq = runCommand "mailq-wrapper" { preferLocalBuild = true; } ''
41 ln -s /run/wrappers/bin/sendmail $out/bin/mailq
44 stdenv.mkDerivation rec {
45 pname = "monitoring-plugins";
48 src = fetchFromGitHub {
49 owner = "monitoring-plugins";
50 repo = "monitoring-plugins";
52 sha256 = "sha256-J9fzlxIpujoG7diSRscFhmEV9HpBOxFTJSmGGFjAzcM=";
56 # fix build (makefile cannot produce -lcrypto)
57 # remove on next release
59 url = "https://github.com/monitoring-plugins/monitoring-plugins/commit/bad156676894a2755c8b76519a11cdd2037e5cd6.patch";
60 hash = "sha256-aI/sX04KXe968SwdS8ZamNtgdNbHtho5cDsDaA+cjZY=";
62 # fix check_smtp with --starttls https://github.com/monitoring-plugins/monitoring-plugins/pull/1952
63 # remove on next release
65 url = "https://github.com/monitoring-plugins/monitoring-plugins/commit/2eea6bb2a04bbfb169bac5f0f7c319f998e8ab87.patch";
66 hash = "sha256-CyVD340+zOxuxRRPmtowD3DFFRB1Q7+AANzul9HqwBI=";
70 # TODO: Awful hack. Grrr...
71 # Anyway the check that configure performs to figure out the ping
72 # syntax is totally impure, because it runs an actual ping to
73 # localhost (which won't work for ping6 if IPv6 support isn't
74 # configured on the build machine).
76 # --with-ping-command needs to be done here instead of in
77 # configureFlags due to the spaces in the argument
79 substituteInPlace po/Makefile.in.in \
80 --replace /bin/sh ${runtimeShell}
83 -e 's|^DEFAULT_PATH=.*|DEFAULT_PATH=\"${binPath}\"|'
85 configureFlagsArray+=(
86 --with-ping-command='${lib.getBin unixtools.ping}/bin/ping -4 -n -U -w %d -c %d %s'
87 --with-ping6-command='${lib.getBin unixtools.ping}/bin/ping -6 -n -U -w %d -c %d %s'
92 "--libexecdir=${placeholder "out"}/bin"
93 "--with-mailq-command=${mailq}/bin/mailq"
94 "--with-sudo-command=/run/wrappers/bin/sudo"
103 # TODO: make openssh a runtime dependency only
112 nativeBuildInputs = [ autoreconfHook pkg-config ];
114 enableParallelBuilding = true;
117 description = "Official monitoring plugins for Nagios/Icinga/Sensu and others";
118 homepage = "https://www.monitoring-plugins.org";
119 license = licenses.gpl3Only;
120 maintainers = with maintainers; [ thoughtpolice relrod ];
121 platforms = platforms.linux;