1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 16:42:09 +00:00
nixpkgs/pkgs/tools/misc/logstash/default.nix

54 lines
1.4 KiB
Nix
Raw Normal View History

2018-08-03 11:23:56 +01:00
{ elk6Version
, enableUnfree ? true
, stdenv
, fetchurl
, makeWrapper
, jre
}:
with stdenv.lib;
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}";
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
2018-11-29 16:10:15 +00:00
then "01mkb9fr63m3ilp4cbbjccid5m8yc7iqhnli12ynfabsf7302fdz"
else "0r60183yyywabinsv9pkd8sx0wq68h740xi3172fypjfdcqs0g9c";
2014-07-11 17:50:02 +01:00
};
2015-08-19 22:09:03 +01:00
dontBuild = true;
dontPatchELF = true;
dontStrip = true;
dontPatchShebangs = true;
buildInputs = [
makeWrapper jre
];
2016-10-01 22:11:30 +01:00
2014-07-11 17:50:02 +01:00
installPhase = ''
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 \
--set JAVA_HOME "${jre}"
wrapProgram $out/bin/logstash-plugin \
--set JAVA_HOME "${jre}"
2014-07-11 17:50:02 +01:00
'';
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-08-03 11:23:56 +01:00
license = if enableUnfree then licenses.elastic else licenses.asl20;
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
};
}