about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorBas van Dijk <v.dijk.bas@gmail.com>2019-04-15 07:05:13 +0200
committerGitHub <noreply@github.com>2019-04-15 07:05:13 +0200
commite5724e8e664ebf731f86220fe6722e9678489f3a (patch)
tree88ee31a590772ccc60c21ab3356c652b3443229e /pkgs/tools
parente367f9459dcc36e362ff4ddd11c70f6b76be5200 (diff)
parent13352f28d2b587a01c262cbee29678209c919e95 (diff)
Merge pull request #59514 from basvandijk/elk-7.0.0
elk7: init at 7.0.0
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/logstash/6.x.nix (renamed from pkgs/tools/misc/logstash/default.nix)0
-rw-r--r--pkgs/tools/misc/logstash/7.x.nix53
2 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/tools/misc/logstash/default.nix b/pkgs/tools/misc/logstash/6.x.nix
index 359c714228e08..359c714228e08 100644
--- a/pkgs/tools/misc/logstash/default.nix
+++ b/pkgs/tools/misc/logstash/6.x.nix
diff --git a/pkgs/tools/misc/logstash/7.x.nix b/pkgs/tools/misc/logstash/7.x.nix
new file mode 100644
index 0000000000000..bb4a6b1436be8
--- /dev/null
+++ b/pkgs/tools/misc/logstash/7.x.nix
@@ -0,0 +1,53 @@
+{ elk7Version
+, enableUnfree ? true
+, stdenv
+, fetchurl
+, makeWrapper
+, jre
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  version = elk7Version;
+  name = "logstash-${optionalString (!enableUnfree) "oss-"}${version}";
+
+  src = fetchurl {
+    url = "https://artifacts.elastic.co/downloads/logstash/${name}.tar.gz";
+    sha256 =
+      if enableUnfree
+      then "1dzk9amg23vbkj92wx529i1m2rrfjc0gzkbg6w3f6xaix5zch0vp"
+      else "07q2gbd3xidcklid5ny22zpb3q5v0z3k2kva6g214k7rnkr9bhyy";
+  };
+
+  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 ];
+  };
+}