Merge pull request #39303 from moaxcp/jbake2

jbake: wrap script
This commit is contained in:
Jörg Thalheim 2018-04-21 14:05:35 +01:00 committed by GitHub
commit 9a3583de40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ stdenv, fetchzip, jre }: { stdenv, fetchzip, makeWrapper, jre }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.6.1"; version = "2.6.1";
@ -9,12 +9,12 @@ stdenv.mkDerivation rec {
sha256 = "0zlh2azmv8gj3c4d4ndivar31wd42nmvhxq6xhn09cib9kffxbc7"; sha256 = "0zlh2azmv8gj3c4d4ndivar31wd42nmvhxq6xhn09cib9kffxbc7";
}; };
buildInputs = [ jre ]; buildInputs = [ makeWrapper jre ];
installPhase = '' installPhase = ''
substituteInPlace bin/jbake --replace "java" "${jre}/bin/java"
mkdir -p $out mkdir -p $out
cp -vr * $out cp -vr * $out
wrapProgram $out/bin/jbake --set JAVA_HOME "${jre}"
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {