depot/pkgs/servers/monitoring/nagios-plugins/check_ssl_cert/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

67 lines
1.4 KiB
Nix

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