about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/monitoring/prometheus/unbound-exporter.nix
blob: e683ca72b9e500f5c1a75db2d4c411c8a54d5037 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib
, buildGoModule
, fetchFromGitHub
, nixosTests
}:

let
  version = "0.4.5";
in
buildGoModule {
  pname = "unbound_exporter";
  inherit version;

  src = fetchFromGitHub {
    owner = "letsencrypt";
    repo = "unbound_exporter";
    rev = "refs/tags/v${version}";
    hash = "sha256-p2VSIQXTnNGgqUSvWQ4J3SbrnWGBO21ps4VCWOjioLM=";
  };

  vendorHash = "sha256-q3JqAGeEU5WZWTzdFE9hR2dAnsFjMM44JiYdodZrnhs=";

  passthru.tests = {
    inherit (nixosTests.prometheus-exporters) unbound;
  };

  meta = with lib; {
    changelog = "https://github.com/letsencrypt/unbound_exporter/releases/tag/v${version}";
    description = "Prometheus exporter for Unbound DNS resolver";
    homepage = "https://github.com/letsencrypt/unbound_exporter/tree/main";
    license = licenses.asl20;
    maintainers = with maintainers; [ hexa ];
  };
}