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