forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / servers / monitoring / nagios-plugins / check_ssl_cert / default.nix
blob9ad31b8efaa0fda555897d0079d59b3756b6e2f2
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,
19 stdenv.mkDerivation rec {
20   pname = "check_ssl_cert";
21   version = "2.84.5";
23   src = fetchFromGitHub {
24     owner = "matteocorti";
25     repo = "check_ssl_cert";
26     rev = "refs/tags/v${version}";
27     hash = "sha256-4/vrJ3G45kEg77IbLlWqQYpYYnqMxW3lr9tPGbv5Qno=";
28   };
30   nativeBuildInputs = [ makeWrapper ];
32   makeFlags = [
33     "DESTDIR=$(out)/bin"
34     "MANDIR=$(out)/share/man"
35   ];
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   '';
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   };