1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 12:42:24 +00:00

logstash: wrapProgram to provide jre at runtime

This commit is contained in:
Chris Van Vranken 2016-09-29 21:55:25 -04:00 committed by Jörg Thalheim
parent 5bf5de58ea
commit d2590d9d9e
No known key found for this signature in database
GPG key ID: CA4106B8D7CC79FA

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
version = "2.3.4";
@ -14,10 +14,20 @@ stdenv.mkDerivation rec {
dontStrip = true;
dontPatchShebangs = true;
buildInputs = [
makeWrapper jre
];
installPhase = ''
mkdir -p $out
cp -r {Gemfile*,vendor,lib,bin} $out
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; {