at 18.09-beta 53 lines 1.4 kB view raw
1{ elk6Version 2, enableUnfree ? true 3, stdenv 4, fetchurl 5, makeWrapper 6, jre 7}: 8 9with stdenv.lib; 10 11stdenv.mkDerivation rec { 12 version = elk6Version; 13 name = "logstash-${optionalString (!enableUnfree) "oss-"}${version}"; 14 15 src = fetchurl { 16 url = "https://artifacts.elastic.co/downloads/logstash/${name}.tar.gz"; 17 sha256 = 18 if enableUnfree 19 then "0yx9hpiav4d5z1b52x2h5i0iknqs9lmxy8vmz0wkb23mjiz8njdr" 20 else "1ir8pbq706mxr56k5cgc9ajn2jp603zrqj66dimx6xxf2nfamw0w"; 21 }; 22 23 dontBuild = true; 24 dontPatchELF = true; 25 dontStrip = true; 26 dontPatchShebangs = true; 27 28 buildInputs = [ 29 makeWrapper jre 30 ]; 31 32 installPhase = '' 33 mkdir -p $out 34 cp -r {Gemfile*,modules,vendor,lib,bin,config,data,logstash-core,logstash-core-plugin-api} $out 35 36 patchShebangs $out/bin/logstash 37 patchShebangs $out/bin/logstash-plugin 38 39 wrapProgram $out/bin/logstash \ 40 --set JAVA_HOME "${jre}" 41 42 wrapProgram $out/bin/logstash-plugin \ 43 --set JAVA_HOME "${jre}" 44 ''; 45 46 meta = with stdenv.lib; { 47 description = "Logstash is a data pipeline that helps you process logs and other event data from a variety of systems"; 48 homepage = https://www.elastic.co/products/logstash; 49 license = if enableUnfree then licenses.elastic else licenses.asl20; 50 platforms = platforms.unix; 51 maintainers = with maintainers; [ wjlroe offline basvandijk ]; 52 }; 53}