summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/dn/dnstap/package.nix
blob: 5238517f1bf2f0dfcf0cc8f20afeb1cca98bf742 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
{
  buildGoModule,
  fetchFromGitHub,
  installShellFiles,
  lib,
  stdenv,
}:
buildGoModule (finalAttrs: {
  pname = "dnstap";
  version = "0.4.0";

  src = fetchFromGitHub {
    owner = "dnstap";
    repo = "golang-dnstap";
    tag = "v${finalAttrs.version}";
    hash = "sha256-GmwHJ6AQ4HcPEFNeodKqJe/mYE1Fa95hRiQWoka/nv4=";
  };

  vendorHash = "sha256-xDui88YgLqIETIR34ZdqT6Iz12v+Rdf6BssAIXgaMLU=";

  nativeBuildInputs = [
    installShellFiles
  ];

  postInstall = ''
    installManPage dnstap/dnstap.8
  '';

  meta = {
    description = "Structured DNS server events decoding utility";
    longDescription = ''
      dnstap implements an encoding format for DNS server events. It uses a
      lightweight framing on top of event payloads encoded using Protocol
      Buffers and is transport neutral.

      dnstap can represent internal state inside a DNS server that is difficult
      to obtain using techniques based on traditional packet capture or
      unstructured textual format logging.
    '';
    homepage = "https://dnstap.info";
    changelog = "https://github.com/dnstap/golang-dnstap/releases/tag/${finalAttrs.src.rev}";
    license = lib.licenses.asl20;
    broken = stdenv.hostPlatform.isDarwin;
    maintainers = [ lib.maintainers.azahi ];
    mainProgram = "dnstap";
  };
})