3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #99616 from avdv/sbt-1.4.0

sbt: 1.3.13 -> 1.4.0
This commit is contained in:
Tim Steinbach 2020-10-05 09:24:17 -04:00 committed by GitHub
commit 41a6a77b9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,25 +1,27 @@
{ stdenv, fetchurl, jre }:
{ stdenv, fetchurl, jre, autoPatchelfHook, zlib }:
stdenv.mkDerivation rec {
pname = "sbt";
version = "1.3.13";
version = "1.4.0";
src = fetchurl {
urls = [
"https://piccolo.link/sbt-${version}.tgz"
"https://github.com/sbt/sbt/releases/download/v${version}/sbt-${version}.tgz"
];
sha256 = "08mx84kzpm750zjxm225nh9wqm7js5y2k6hgb8xw3n574zg58hc5";
url = "https://github.com/sbt/sbt/releases/download/v${version}/sbt-${version}.tgz";
sha256 = "1mgfs732w1c1p7dna7h47x8h073lvjs224fqlpkkvq10153mnxxl";
};
patchPhase = ''
echo -java-home ${jre.home} >>conf/sbtopts
'';
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ zlib ];
installPhase = ''
mkdir -p $out/share/sbt $out/bin
cp -ra . $out/share/sbt
ln -s $out/share/sbt/bin/sbt $out/bin/
ln -sT ../share/sbt/bin/sbt $out/bin/sbt
ln -sT ../share/sbt/bin/sbtn-x86_64-${ if (stdenv.isDarwin) then "apple-darwin" else "pc-linux"} $out/bin/sbtn
'';
meta = with stdenv.lib; {