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

37 lines
972 B
Nix
Raw Normal View History

2017-10-27 12:03:25 +00:00
{ stdenv, fetchurl, jre, bc }:
stdenv.mkDerivation rec {
name = "sbt-${version}";
2017-10-27 12:03:25 +00:00
version = "1.0.3";
src = fetchurl {
2017-07-28 15:27:35 +00:00
urls = [
"https://dl.bintray.com/sbt/native-packages/sbt/${version}/${name}.tgz"
2017-08-11 14:22:20 +00:00
"https://github.com/sbt/sbt/releases/download/v${version}/sbt-${version}.tgz"
2017-09-02 16:54:19 +00:00
"https://cocl.us/sbt-${version}.tgz"
2017-07-28 15:27:35 +00:00
];
2017-10-27 12:03:25 +00:00
sha256 = "041cv25gxqsi3rlglw5d8aqgdzb6y5ak3f52dwqvzrrj854vyx13";
};
2015-09-25 14:54:35 +00:00
patchPhase = ''
echo -java-home ${jre.home} >>conf/sbtopts
2017-10-27 12:03:25 +00:00
substituteInPlace bin/sbt-launch-lib.bash \
--replace "| bc)" "| ${bc}/bin/bc)"
2015-09-25 14:54:35 +00:00
'';
installPhase = ''
2015-09-25 14:54:35 +00:00
mkdir -p $out/share/sbt $out/bin
cp -ra . $out/share/sbt
ln -s $out/share/sbt/bin/sbt $out/bin/
'';
2016-07-21 10:29:14 +00:00
meta = with stdenv.lib; {
homepage = http://www.scala-sbt.org/;
2016-07-21 10:29:14 +00:00
license = licenses.bsd3;
description = "A build tool for Scala, Java and more";
2016-07-21 10:29:14 +00:00
maintainers = with maintainers; [ rickynils ];
platforms = platforms.unix;
};
}