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