summary refs log tree commit diff
path: root/pkgs/tools/misc/logstash/6.x.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/logstash/6.x.nix')
-rw-r--r--pkgs/tools/misc/logstash/6.x.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/tools/misc/logstash/6.x.nix b/pkgs/tools/misc/logstash/6.x.nix
new file mode 100644
index 00000000000..359c714228e
--- /dev/null
+++ b/pkgs/tools/misc/logstash/6.x.nix
@@ -0,0 +1,53 @@
+{ elk6Version
+, enableUnfree ? true
+, stdenv
+, fetchurl
+, makeWrapper
+, jre
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  version = elk6Version;
+  name = "logstash-${optionalString (!enableUnfree) "oss-"}${version}";
+
+  src = fetchurl {
+    url = "https://artifacts.elastic.co/downloads/logstash/${name}.tar.gz";
+    sha256 =
+      if enableUnfree
+      then "18j2n6gnhfjmb6skhhrzs0d1zwa1aj9jv37rqvg4w3fimnm8p0sh"
+      else "181x8y6izrh587a6d1qipgj8wk71v4fggypkzjkns4my00nki42y";
+  };
+
+  dontBuild         = true;
+  dontPatchELF      = true;
+  dontStrip         = true;
+  dontPatchShebangs = true;
+
+  buildInputs = [
+    makeWrapper jre
+  ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r {Gemfile*,modules,vendor,lib,bin,config,data,logstash-core,logstash-core-plugin-api} $out
+
+    patchShebangs $out/bin/logstash
+    patchShebangs $out/bin/logstash-plugin
+
+    wrapProgram $out/bin/logstash \
+       --set JAVA_HOME "${jre}"
+
+    wrapProgram $out/bin/logstash-plugin \
+       --set JAVA_HOME "${jre}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Logstash is a data pipeline that helps you process logs and other event data from a variety of systems";
+    homepage    = https://www.elastic.co/products/logstash;
+    license     = if enableUnfree then licenses.elastic else licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ wjlroe offline basvandijk ];
+  };
+}