logstash: wrapProgram to provide jre at runtime
This commit is contained in:
parent
5bf5de58ea
commit
d2590d9d9e
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl }:
|
{ stdenv, fetchurl, makeWrapper, jre }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "2.3.4";
|
version = "2.3.4";
|
||||||
|
@ -14,10 +14,20 @@ stdenv.mkDerivation rec {
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
dontPatchShebangs = true;
|
dontPatchShebangs = true;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
makeWrapper jre
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp -r {Gemfile*,vendor,lib,bin} $out
|
cp -r {Gemfile*,vendor,lib,bin} $out
|
||||||
mv $out/bin/plugin $out/bin/logstash-plugin
|
mv $out/bin/plugin $out/bin/logstash-plugin
|
||||||
|
|
||||||
|
wrapProgram $out/bin/logstash \
|
||||||
|
--set JAVA_HOME "${jre}"
|
||||||
|
|
||||||
|
wrapProgram $out/bin/rspec \
|
||||||
|
--set JAVA_HOME "${jre}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|
Loading…
Reference in New Issue