nixpkgs/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix
Moritz 'e1mo' Fromm 2db377afd1
checkSSLCert: Add missing runtime dependencies
Not all of the required or optional dependencies listed under
<https://github.com/matteocorti/check_ssl_cert/blob/master/INSTALL.md>
were present, causing the program to fail due to the lack of the bc
binary.
2022-11-26 21:53:16 +01:00

51 lines
1.0 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, file
, openssl
, makeWrapper
, which
, curl
, bc
, coreutils # date and timeout binary
, bind # host and dig binary
, nmap
, iproute2
, netcat-gnu
, python3
}:
stdenv.mkDerivation rec {
pname = "check_ssl_cert";
version = "2.54.0";
src = fetchFromGitHub {
owner = "matteocorti";
repo = "check_ssl_cert";
rev = "v${version}";
hash = "sha256-rRzO5MYpQrDuMyQlOCupV6IR7ZZgpU2lhPpgqoEXiaY=";
};
nativeBuildInputs = [
makeWrapper
];
makeFlags = [
"DESTDIR=$(out)/bin"
"MANDIR=$(out)/share/man"
];
postInstall = ''
wrapProgram $out/bin/check_ssl_cert \
--prefix PATH : "${lib.makeBinPath [ openssl file which curl bc coreutils bind nmap iproute2 netcat-gnu python3 ]}"
'';
meta = with lib; {
description = "Nagios plugin to check the CA and validity of an X.509 certificate";
homepage = "https://github.com/matteocorti/check_ssl_cert";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ fab ];
platforms = platforms.all;
};
}