nixpkgs/pkgs/development/tools/build-managers/sbt/default.nix

30 lines
741 B
Nix
Raw Normal View History

{ stdenv, fetchurl, jre }:
stdenv.mkDerivation rec {
name = "sbt-${version}";
2015-03-22 18:58:01 +00:00
version = "0.13.8";
src = fetchurl {
url = "http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/${version}/sbt-launch.jar";
2015-03-22 18:58:01 +00:00
sha256 = "0n4ivla8s8ygfnf95dj624nhcyganigf7fy0gamgyf31vw1vnw35";
};
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
cat > $out/bin/sbt << EOF
#! ${stdenv.shell}
2013-12-08 18:49:40 +00:00
${jre}/bin/java \$SBT_OPTS -jar ${src} "\$@"
EOF
chmod +x $out/bin/sbt
'';
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 ];
};
}