2021-01-25 09:26:54 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, nixosTests }:
|
2019-07-29 20:06:41 +02:00
|
|
|
|
2020-08-24 10:16:22 +02:00
|
|
|
buildGoModule {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "mailexporter";
|
2020-08-24 10:16:22 +02:00
|
|
|
version = "2020-07-16";
|
2019-07-29 20:06:41 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cherti";
|
|
|
|
repo = "mailexporter";
|
2020-08-24 10:16:22 +02:00
|
|
|
rev = "f5a552c736ac40ccdc0110d2e9a71619c1cd6862";
|
|
|
|
sha256 = "0y7sg9qrd7q6g5gi65sjvw6byfmk2ph0a281wjc9cr4pd25xkciz";
|
2019-07-29 20:06:41 +02:00
|
|
|
};
|
|
|
|
|
2020-08-24 10:16:22 +02:00
|
|
|
vendorSha256 = "1hwahk8v3qnmyn6bwk9l2zpr0k7p2w7zjzxmjwgjyx429g9rzqs0";
|
2019-07-29 20:06:41 +02:00
|
|
|
|
2020-04-26 05:16:55 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2019-07-29 20:06:41 +02:00
|
|
|
postInstall = ''
|
2020-04-26 05:16:55 +02:00
|
|
|
installManPage $src/man/mailexporter.1
|
|
|
|
installManPage $src/man/mailexporter.conf.5
|
2019-07-29 20:06:41 +02:00
|
|
|
'';
|
|
|
|
|
2020-06-18 12:48:40 +02:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) mail; };
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-07-29 20:06:41 +02:00
|
|
|
description = "Export Prometheus-style metrics about mail server functionality";
|
|
|
|
homepage = "https://github.com/cherti/mailexporter";
|
|
|
|
license = licenses.gpl3;
|
2019-08-20 19:36:05 +02:00
|
|
|
maintainers = with maintainers; [ willibutz globin ];
|
2019-07-29 20:06:41 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|