2018-06-24 13:22:12 +02:00
|
|
|
{ elk6Version
|
|
|
|
, enableUnfree ? true
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, makeWrapper
|
|
|
|
, jre
|
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2017-12-18 20:53:54 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = elk6Version;
|
2018-06-24 13:22:12 +02:00
|
|
|
name = "logstash-${optionalString (!enableUnfree) "oss-"}${version}";
|
2017-12-18 20:53:54 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://artifacts.elastic.co/downloads/logstash/${name}.tar.gz";
|
2018-06-24 13:22:12 +02:00
|
|
|
sha256 =
|
|
|
|
if enableUnfree
|
|
|
|
then "0yx9hpiav4d5z1b52x2h5i0iknqs9lmxy8vmz0wkb23mjiz8njdr"
|
|
|
|
else "1ir8pbq706mxr56k5cgc9ajn2jp603zrqj66dimx6xxf2nfamw0w";
|
2017-12-18 20:53:54 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2018-04-08 01:44:38 +02:00
|
|
|
patchShebangs $out/bin/logstash
|
|
|
|
patchShebangs $out/bin/logstash-plugin
|
|
|
|
|
2017-12-18 20:53:54 +01:00
|
|
|
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;
|
2018-06-24 13:22:12 +02:00
|
|
|
license = if enableUnfree then licenses.elastic else licenses.asl20;
|
2017-12-18 20:53:54 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ wjlroe offline basvandijk ];
|
|
|
|
};
|
|
|
|
}
|