3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/build-managers/sbt/default.nix

47 lines
1 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchurl
, jre
, autoPatchelfHook
, zlib
}:
stdenv.mkDerivation rec {
pname = "sbt";
2021-04-06 07:44:54 +01:00
version = "1.5.0";
src = fetchurl {
2021-03-10 19:31:11 +00:00
url = "https://github.com/sbt/sbt/releases/download/v${version}/sbt-${version}.tgz";
2021-04-06 07:44:54 +01:00
sha256 = "1dj241cj3v8kzqnz5s499rijpl7wv4rw171swqnc0xza90513pxa";
};
postPatch = ''
2015-09-25 15:54:35 +01:00
echo -java-home ${jre.home} >>conf/sbtopts
'';
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
buildInputs = lib.optionals stdenv.isLinux [ zlib ];
installPhase = ''
runHook preInstall
2015-09-25 15:54:35 +01:00
mkdir -p $out/share/sbt $out/bin
cp -ra . $out/share/sbt
ln -sT ../share/sbt/bin/sbt $out/bin/sbt
2020-10-08 15:50:33 +01:00
ln -sT ../share/sbt/bin/sbtn-x86_64-${
if (stdenv.isDarwin) then "apple-darwin" else "pc-linux"
} $out/bin/sbtn
runHook postInstall
'';
meta = with lib; {
2020-04-01 19:55:05 +01:00
homepage = "https://www.scala-sbt.org/";
2016-07-21 11:29:14 +01:00
license = licenses.bsd3;
description = "A build tool for Scala, Java and more";
maintainers = with maintainers; [ nequissimus ];
2016-07-21 11:29:14 +01:00
platforms = platforms.unix;
};
}