forked from mirrors/nixpkgs
54 lines
1.4 KiB
Nix
54 lines
1.4 KiB
Nix
{ 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 "178shgxwc9kw9w9vwsvwxp8m8r6lssaw1i32vvmx9na01b4w5m4p"
|
|
else "0gyq97qsg7fys9cc5yj4kpcf3xxvdd5qgzal368yg9swps37g5yj";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|