2013-11-05 13:19:11 +00:00
|
|
|
{ stdenv, fetchurl, jre }:
|
2010-05-08 21:51:47 +00:00
|
|
|
|
2013-11-05 13:19:11 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "sbt-${version}";
|
2015-08-12 05:45:25 +00:00
|
|
|
version = "0.13.9";
|
2013-05-14 22:41:22 +00:00
|
|
|
|
2013-11-05 13:19:11 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/${version}/sbt-launch.jar";
|
2015-08-12 05:45:25 +00:00
|
|
|
sha256 = "04k411gcrq35ayd2xj79bcshczslyqkicwvhkf07hkyr4j3blxda";
|
2013-05-14 22:41:22 +00:00
|
|
|
};
|
2010-05-08 21:51:47 +00:00
|
|
|
|
2013-11-05 13:19:11 +00:00
|
|
|
phases = [ "installPhase" ];
|
2013-05-14 22:41:22 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2013-11-05 13:19:11 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cat > $out/bin/sbt << EOF
|
2014-09-12 15:09:58 +00:00
|
|
|
#! ${stdenv.shell}
|
2015-08-07 16:46:23 +00:00
|
|
|
if [ ! -v JAVA_HOME ]; then
|
|
|
|
export JAVA_HOME="${jre.home}"
|
|
|
|
fi
|
2013-12-08 18:49:40 +00:00
|
|
|
${jre}/bin/java \$SBT_OPTS -jar ${src} "\$@"
|
2013-05-14 22:41:22 +00:00
|
|
|
EOF
|
2013-11-05 13:19:11 +00:00
|
|
|
chmod +x $out/bin/sbt
|
2013-05-14 22:41:22 +00:00
|
|
|
'';
|
|
|
|
|
2014-06-05 10:36:39 +00:00
|
|
|
meta = {
|
2013-11-05 13:19:11 +00:00
|
|
|
homepage = http://www.scala-sbt.org/;
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
description = "A build tool for Scala, Java and more";
|
2014-06-05 10:36:39 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.rickynils ];
|
|
|
|
};
|
2013-05-14 22:41:22 +00:00
|
|
|
}
|