Merge pull request #9148 from Profpatsch/sbt-java-home

wrap sbt with $JAVA_HOME
This commit is contained in:
Peter Simons 2015-08-09 00:45:44 +02:00
commit e8e206aa42

View File

@ -15,6 +15,9 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin
cat > $out/bin/sbt << EOF
#! ${stdenv.shell}
if [ ! -v JAVA_HOME ]; then
export JAVA_HOME="${jre.home}"
fi
${jre}/bin/java \$SBT_OPTS -jar ${src} "\$@"
EOF
chmod +x $out/bin/sbt