Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 bc,
3 bind,
4 coreutils,
5 curl,
6 fetchFromGitHub,
7 file,
8 iproute2,
9 lib,
10 makeWrapper,
11 netcat-gnu,
12 nmap,
13 openssl,
14 python3,
15 stdenv,
16 which,
17}:
18
19stdenv.mkDerivation rec {
20 pname = "check_ssl_cert";
21 version = "2.94.0";
22
23 src = fetchFromGitHub {
24 owner = "matteocorti";
25 repo = "check_ssl_cert";
26 tag = "v${version}";
27 hash = "sha256-t1bgW8a4g289nn34c4xnIyus7aAkZUII+/wXEIEmD2c=";
28 };
29
30 nativeBuildInputs = [ makeWrapper ];
31
32 makeFlags = [
33 "DESTDIR=$(out)/bin"
34 "MANDIR=$(out)/share/man"
35 ];
36
37 postInstall = ''
38 wrapProgram $out/bin/check_ssl_cert \
39 --prefix PATH : "${
40 lib.makeBinPath (
41 [
42 bc
43 bind # host and dig binary
44 coreutils # date and timeout binary
45 curl
46 file
47 netcat-gnu
48 nmap
49 openssl
50 python3
51 which
52 ]
53 ++ lib.optional stdenv.hostPlatform.isLinux iproute2
54 )
55 }"
56 '';
57
58 meta = {
59 changelog = "https://github.com/matteocorti/check_ssl_cert/releases/tag/v${version}";
60 description = "Nagios plugin to check the CA and validity of an X.509 certificate";
61 homepage = "https://github.com/matteocorti/check_ssl_cert";
62 license = lib.licenses.gpl3Plus;
63 mainProgram = "check_ssl_cert";
64 maintainers = with lib.maintainers; [ fab ];
65 platforms = lib.platforms.all;
66 };
67}