summary refs log tree commit diff
path: root/pkgs/tools/system
diff options
context:
space:
mode:
authorMarius Bergmann <marius@yeai.de>2017-01-03 14:12:36 +0100
committerMarius Bergmann <marius@yeai.de>2017-01-23 18:28:55 +0100
commit00444cbf25fcc7d1db64e6fe482815b52f699353 (patch)
treed30e766c6a96bd072d0dbe5f1cec81844c8b6dd1 /pkgs/tools/system
parent6aae00edfc5431be95c4285ca93f471b7b9f69e4 (diff)
downloadnixlib-00444cbf25fcc7d1db64e6fe482815b52f699353.tar
nixlib-00444cbf25fcc7d1db64e6fe482815b52f699353.tar.gz
nixlib-00444cbf25fcc7d1db64e6fe482815b52f699353.tar.bz2
nixlib-00444cbf25fcc7d1db64e6fe482815b52f699353.tar.lz
nixlib-00444cbf25fcc7d1db64e6fe482815b52f699353.tar.xz
nixlib-00444cbf25fcc7d1db64e6fe482815b52f699353.tar.zst
nixlib-00444cbf25fcc7d1db64e6fe482815b52f699353.zip
journalbeat service: init at 5.1.2
Journalbeat is a log shipper from systemd/journald to
Logstash/Elasticsearch. I added a package as well as a NixOS service
module for it.
Diffstat (limited to 'pkgs/tools/system')
-rw-r--r--pkgs/tools/system/journalbeat/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/tools/system/journalbeat/default.nix b/pkgs/tools/system/journalbeat/default.nix
new file mode 100644
index 000000000000..5a66fcf52990
--- /dev/null
+++ b/pkgs/tools/system/journalbeat/default.nix
@@ -0,0 +1,34 @@
+{ lib, pkgs, buildGoPackage, fetchFromGitHub, makeWrapper }:
+
+let
+
+  libPath = lib.makeLibraryPath [ pkgs.systemd.lib ];
+
+in buildGoPackage rec {
+
+  name = "journalbeat-${version}";
+  version = "5.1.2";
+
+  goPackagePath = "github.com/mheese/journalbeat";
+
+  buildInputs = [ makeWrapper pkgs.systemd ];
+
+  postInstall = ''
+    wrapProgram $bin/bin/journalbeat \
+      --prefix LD_LIBRARY_PATH : ${libPath}
+  '';
+
+  src = fetchFromGitHub {
+    owner = "mheese";
+    repo = "journalbeat";
+    rev = "v${version}";
+    sha256 = "179jayzvd5k4mwhn73yflbzl5md1fmv7a9hb8vz2ir76lvr33g3l";
+  };
+
+  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 ];
+  };
+}