1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 17:10:48 +00:00

sbt: use sbt-launcher-package.

This commit is contained in:
Gabriel Ebner 2015-09-25 16:54:35 +02:00
parent 735f0f2ca8
commit 98be4ed5e8

View file

@ -5,22 +5,18 @@ stdenv.mkDerivation rec {
version = "0.13.9"; version = "0.13.9";
src = fetchurl { src = fetchurl {
url = "http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/${version}/sbt-launch.jar"; url = "https://dl.bintray.com/sbt/native-packages/sbt/${version}/${name}.tgz";
sha256 = "04k411gcrq35ayd2xj79bcshczslyqkicwvhkf07hkyr4j3blxda"; sha256 = "148f2801f2993773de6f8859fe0e6520fcabe649d66bb316e13aff8b2fd7f504";
}; };
phases = [ "installPhase" ]; patchPhase = ''
echo -java-home ${jre.home} >>conf/sbtopts
'';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/share/sbt $out/bin
cat > $out/bin/sbt << EOF cp -ra . $out/share/sbt
#! ${stdenv.shell} ln -s $out/share/sbt/bin/sbt $out/bin/
if [ ! -v JAVA_HOME ]; then
export JAVA_HOME="${jre.home}"
fi
${jre}/bin/java \$SBT_OPTS -jar ${src} "\$@"
EOF
chmod +x $out/bin/sbt
''; '';
meta = { meta = {