nixos/amazon-image: fix eval (#378799)
[NixPkgs.git] / pkgs / servers / monitoring / prometheus / mail-exporter.nix
blob62b9697dca2230c215e3a4c426fc013213ebada4
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   installShellFiles,
6   nixosTests,
7 }:
9 buildGoModule {
10   pname = "mailexporter";
11   version = "2020-07-16";
13   src = fetchFromGitHub {
14     owner = "cherti";
15     repo = "mailexporter";
16     rev = "f5a552c736ac40ccdc0110d2e9a71619c1cd6862";
17     hash = "sha256-P7LZi2iXZJaY5AEJBeAVszq/DN9SFxNfeQaflnF6+ng=";
18   };
20   vendorHash = "sha256-QOOf00uCdC8fl7V/+Q8X90yQ7xc0Tb6M9dXisdGEisM=";
22   nativeBuildInputs = [ installShellFiles ];
24   postInstall = ''
25     installManPage $src/man/mailexporter.1
26     installManPage $src/man/mailexporter.conf.5
27   '';
29   passthru.tests = { inherit (nixosTests.prometheus-exporters) mail; };
31   meta = with lib; {
32     description = "Export Prometheus-style metrics about mail server functionality";
33     mainProgram = "mailexporter";
34     homepage = "https://github.com/cherti/mailexporter";
35     license = licenses.gpl3;
36     maintainers = with maintainers; [
37       willibutz
38       globin
39     ];
40     platforms = platforms.linux;
41   };