sbt: Update to 0.13.0
Also remove all old sbt versions, and rename package to sbt instead of simple-build-tool. sbt seems to be the correct name for this package.
This commit is contained in:
parent
b5554b3f5c
commit
2d44f3e8af
@ -1,93 +1,30 @@
|
||||
{ stdenv, versionedDerivation, fetchurl, version ? "xsbt-0.12.3" }:
|
||||
{ stdenv, fetchurl, jre }:
|
||||
|
||||
let
|
||||
stdenv.mkDerivation rec {
|
||||
name = "sbt-${version}";
|
||||
version = "0.13.0";
|
||||
|
||||
description = "A build tool for Scala";
|
||||
longDescription = name: ''
|
||||
${name} is a simple build tool for Scala projects that aims to do the
|
||||
basics well.
|
||||
|
||||
This package is the sbt launcher which automatically manages
|
||||
and downloads dependencies, including the SBT package and the
|
||||
Scala compiler.
|
||||
'';
|
||||
|
||||
metaSBT = {
|
||||
inherit description;
|
||||
longDescription = longDescription "sbt";
|
||||
homepage = http://code.google.com/p/simple-build-tool/;
|
||||
license = "bsd";
|
||||
};
|
||||
|
||||
metaXSBT = {
|
||||
inherit description;
|
||||
longDescription = longDescription "xsbt";
|
||||
homepage = https://github.com/harrah/xsbt;
|
||||
license = "bsd";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
# Depends on a JRE at runtime.
|
||||
|
||||
versionedDerivation "simple-build-tool" version {
|
||||
"0.7.3" = let version = "0.7.3"; in {
|
||||
name = "simple-build-tool-${version}";
|
||||
src = fetchurl {
|
||||
url = "http://simple-build-tool.googlecode.com/files/sbt-launch-${version}.jar";
|
||||
sha256 = "1nciifzf00cs54a4h57a7v1hyklm5vgln0sscmz5kzv96ggphs6k";
|
||||
};
|
||||
meta = metaSBT;
|
||||
src = fetchurl {
|
||||
url = "http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/${version}/sbt-launch.jar";
|
||||
sha256 = "04s49v5mw4kwz1rmvbf07kq51i2m0lcv60c9i5y524gjj518pk1w";
|
||||
};
|
||||
|
||||
"0.7.7" = let version = "0.7.7"; in {
|
||||
name = "simple-build-tool-${version}";
|
||||
src = fetchurl {
|
||||
url = "http://simple-build-tool.googlecode.com/files/sbt-launch-${version}.jar";
|
||||
# sha256 = "1nciifzf00cs54a4h57a7v1hyklm5vgln0sscmz5kzv96ggphs6j";
|
||||
sha256 = "2720b033012a7509f7fbdfddfa69c07b105452a6f95bc410cb7dc34c1594ab3d";
|
||||
};
|
||||
meta = metaSBT;
|
||||
};
|
||||
|
||||
"xsbt-0.11.2" = let version = "0.11.2"; in { # scala 2.9
|
||||
name = "xsbt-${version}";
|
||||
|
||||
# scala needs much more PermGen space
|
||||
javaArgs = "-Xmx1024M";
|
||||
# from https://github.com/harrah/xsbt/wiki/Getting-Started-Setup
|
||||
src = fetchurl {
|
||||
url = http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/0.11.2/sbt-launch.jar;
|
||||
sha256 = "14fbzvb1s66wpbqznw65a7nn27qrq1i9pd7wlbydv8ffl49d262n";
|
||||
};
|
||||
meta = metaXSBT;
|
||||
};
|
||||
|
||||
"xsbt-0.12.3" = let version = "0.12.3"; in {
|
||||
name = "xsbt-${version}";
|
||||
|
||||
# Recommended java options from sbt Getting started guide
|
||||
javaArgs = "-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M";
|
||||
# from https://github.com/harrah/xsbt/wiki/Getting-Started-Setup
|
||||
src = fetchurl {
|
||||
url = http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.12.3/sbt-launch.jar;
|
||||
sha256 = "11r26abjzmnmpn65ndbq60qg31s3ichkvzpmxyrq941s1n1dbxgh";
|
||||
};
|
||||
meta = metaXSBT;
|
||||
};
|
||||
}
|
||||
{
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -pv "$out/lib/java"
|
||||
cp $src "$out/lib/java/sbt-launch-${version}.jar"
|
||||
mkdir -p "$out/bin"
|
||||
cat > "$out/bin/sbt" <<EOF
|
||||
#! /bin/sh
|
||||
exec java $javaArgs -jar $out/lib/java/sbt-launch-${version}.jar "\$@"
|
||||
mkdir -p $out/bin
|
||||
cat > $out/bin/sbt << EOF
|
||||
#!/bin/sh
|
||||
SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M"
|
||||
${jre}/bin/java $SBT_OPTS -jar ${src} "\$@"
|
||||
EOF
|
||||
chmod u+x "$out/bin/sbt"
|
||||
chmod +x $out/bin/sbt
|
||||
'';
|
||||
|
||||
phases = "installPhase";
|
||||
meta = {
|
||||
homepage = http://www.scala-sbt.org/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
description = "A build tool for Scala, Java and more";
|
||||
maintainers = [ stdenv.lib.maintainers.rickynils ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user