blob: 3977d5b184410b4641af88f145721b5b37a58c67 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{ lib
, stdenv
, fetchurl
, jre
, autoPatchelfHook
, zlib
, ncurses
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sbt";
version = "1.10.1";
src = fetchurl {
url = "https://github.com/sbt/sbt/releases/download/v${finalAttrs.version}/sbt-${finalAttrs.version}.tgz";
hash = "sha256-R/6YzpSY7kbmnyJnLzwSI0y+fnGedkQQoT5YtyXWWfM=";
};
postPatch = ''
echo -java-home ${jre.home} >>conf/sbtopts
'';
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
buildInputs = lib.optionals stdenv.isLinux [
stdenv.cc.cc # libstdc++.so.6
zlib
];
propagatedBuildInputs = [
# for infocmp
ncurses
];
installPhase = ''
runHook preInstall
mkdir -p $out/share/sbt $out/bin
cp -ra . $out/share/sbt
ln -sT ../share/sbt/bin/sbt $out/bin/sbt
ln -sT ../share/sbt/bin/sbtn-${
if (stdenv.isDarwin) then "universal-apple-darwin"
else if (stdenv.hostPlatform.isAarch64) then "aarch64-pc-linux"
else "x86_64-pc-linux"
} $out/bin/sbtn
runHook postInstall
'';
meta = with lib; {
homepage = "https://www.scala-sbt.org/";
license = licenses.bsd3;
sourceProvenance = with sourceTypes; [
binaryBytecode
binaryNativeCode
];
description = "Build tool for Scala, Java and more";
maintainers = with maintainers; [ nequissimus kashw2 ];
platforms = platforms.unix;
};
})
|