2017-01-03 13:12:36 +00:00
|
|
|
{ lib, pkgs, buildGoPackage, fetchFromGitHub, makeWrapper }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
libPath = lib.makeLibraryPath [ pkgs.systemd.lib ];
|
|
|
|
|
|
|
|
in buildGoPackage rec {
|
|
|
|
|
|
|
|
name = "journalbeat-${version}";
|
2018-03-20 17:19:58 +00:00
|
|
|
version = "5.6.8";
|
2017-01-03 13:12:36 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/mheese/journalbeat";
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper pkgs.systemd ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $bin/bin/journalbeat \
|
2017-10-19 23:56:17 +01:00
|
|
|
--argv0 journalbeat \
|
2017-01-03 13:12:36 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : ${libPath}
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mheese";
|
|
|
|
repo = "journalbeat";
|
|
|
|
rev = "v${version}";
|
2018-03-20 17:19:58 +00:00
|
|
|
sha256 = "1vgpwnwqjc93nvdpcd52748bwl3r371jb55l17bsgdzrmlcyfm8a";
|
2017-01-03 13:12:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|