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