about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/system/journalbeat/default.nix
blob: 0a04581264e07e3932b0c1aa0826f3f82b8c8ce3 (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
{ lib, systemd, buildGoPackage, fetchFromGitHub }:

buildGoPackage rec {
  pname = "journalbeat";
  version = "5.6.8";

  src = fetchFromGitHub {
    owner = "mheese";
    repo = "journalbeat";
    rev = "v${version}";
    sha256 = "1vgpwnwqjc93nvdpcd52748bwl3r371jb55l17bsgdzrmlcyfm8a";
  };

  goPackagePath = "github.com/mheese/journalbeat";

  buildInputs = [ systemd.dev ];

  postFixup = let libPath = lib.makeLibraryPath [ systemd.lib ]; in ''
    patchelf --set-rpath ${libPath} "$bin/bin/journalbeat"
  '';

  meta = with lib; {
    homepage = https://github.com/mheese/journalbeat;
    description = "Journalbeat is a log shipper from systemd/journald to Logstash/Elasticsearch";
    license = licenses.asl20;
    maintainers = with maintainers; [ mbrgm ];
  };
}