2020-08-24 10:16:22 +02:00
|
|
|
{ stdenv, 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; };
|
|
|
|
|
2019-07-29 20:06:41 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|