2018-08-03 10:23:56 +00:00
|
|
|
{ elk6Version
|
|
|
|
, enableUnfree ? true
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, makeWrapper
|
|
|
|
, jre
|
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2012-07-11 11:23:14 +00:00
|
|
|
|
2014-07-11 16:50:02 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-08-03 10:23:56 +00:00
|
|
|
version = elk6Version;
|
|
|
|
name = "logstash-${optionalString (!enableUnfree) "oss-"}${version}";
|
2012-07-11 11:23:14 +00:00
|
|
|
|
2014-07-11 16:50:02 +00:00
|
|
|
src = fetchurl {
|
2018-08-03 10:23:56 +00:00
|
|
|
url = "https://artifacts.elastic.co/downloads/logstash/${name}.tar.gz";
|
|
|
|
sha256 =
|
|
|
|
if enableUnfree
|
2019-05-10 21:32:25 +00:00
|
|
|
then "178shgxwc9kw9w9vwsvwxp8m8r6lssaw1i32vvmx9na01b4w5m4p"
|
|
|
|
else "0gyq97qsg7fys9cc5yj4kpcf3xxvdd5qgzal368yg9swps37g5yj";
|
2014-07-11 16:50:02 +00:00
|
|
|
};
|
2012-07-11 11:23:14 +00:00
|
|
|
|
2015-08-19 21:09:03 +00:00
|
|
|
dontBuild = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontStrip = true;
|
2014-07-14 16:54:20 +00:00
|
|
|
dontPatchShebangs = true;
|
2012-07-11 11:23:14 +00:00
|
|
|
|
2016-09-30 01:55:25 +00:00
|
|
|
buildInputs = [
|
|
|
|
makeWrapper jre
|
|
|
|
];
|
2016-10-01 21:11:30 +00:00
|
|
|
|
2014-07-11 16:50:02 +00:00
|
|
|
installPhase = ''
|
2015-09-06 12:46:31 +00:00
|
|
|
mkdir -p $out
|
2018-08-03 10:23:56 +00:00
|
|
|
cp -r {Gemfile*,modules,vendor,lib,bin,config,data,logstash-core,logstash-core-plugin-api} $out
|
2016-10-01 21:11:30 +00:00
|
|
|
|
2018-08-03 10:23:56 +00:00
|
|
|
patchShebangs $out/bin/logstash
|
|
|
|
patchShebangs $out/bin/logstash-plugin
|
2016-10-01 21:11:30 +00:00
|
|
|
|
2018-08-03 10:23:56 +00:00
|
|
|
wrapProgram $out/bin/logstash \
|
2016-09-30 01:55:25 +00:00
|
|
|
--set JAVA_HOME "${jre}"
|
2016-10-02 07:31:59 +00:00
|
|
|
|
|
|
|
wrapProgram $out/bin/logstash-plugin \
|
|
|
|
--set JAVA_HOME "${jre}"
|
2014-07-11 16:50:02 +00:00
|
|
|
'';
|
|
|
|
|
2015-09-06 12:46:31 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-02-27 17:24:00 +00:00
|
|
|
description = "Logstash is a data pipeline that helps you process logs and other event data from a variety of systems";
|
2015-09-06 12:46:31 +00:00
|
|
|
homepage = https://www.elastic.co/products/logstash;
|
2018-08-03 10:23:56 +00:00
|
|
|
license = if enableUnfree then licenses.elastic else licenses.asl20;
|
2015-09-06 12:46:31 +00:00
|
|
|
platforms = platforms.unix;
|
2018-08-03 10:23:56 +00:00
|
|
|
maintainers = with maintainers; [ wjlroe offline basvandijk ];
|
2014-07-11 16:50:02 +00:00
|
|
|
};
|
2012-07-11 11:23:14 +00:00
|
|
|
}
|