lol
1{ lib, buildGoModule, fetchFromGitHub, installShellFiles, nixosTests }:
2
3buildGoModule {
4 pname = "mailexporter";
5 version = "2020-07-16";
6
7 src = fetchFromGitHub {
8 owner = "cherti";
9 repo = "mailexporter";
10 rev = "f5a552c736ac40ccdc0110d2e9a71619c1cd6862";
11 hash = "sha256-P7LZi2iXZJaY5AEJBeAVszq/DN9SFxNfeQaflnF6+ng=";
12 };
13
14 vendorHash = "sha256-QOOf00uCdC8fl7V/+Q8X90yQ7xc0Tb6M9dXisdGEisM=";
15
16 nativeBuildInputs = [ installShellFiles ];
17
18 postInstall = ''
19 installManPage $src/man/mailexporter.1
20 installManPage $src/man/mailexporter.conf.5
21 '';
22
23 passthru.tests = { inherit (nixosTests.prometheus-exporters) mail; };
24
25 meta = with lib; {
26 description = "Export Prometheus-style metrics about mail server functionality";
27 homepage = "https://github.com/cherti/mailexporter";
28 license = licenses.gpl3;
29 maintainers = with maintainers; [ willibutz globin ];
30 platforms = platforms.linux;
31 };
32}