mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
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 {
|
||||
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; {
|
||||
|
Loading…
Reference in New Issue
Block a user