blob: 13e5d0bdb0644e13c58ffd312e136fcb260a7f05 (
plain)
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
|
{
lib,
stdenv,
fetchurl,
makeWrapper,
jre,
ncurses,
}:
stdenv.mkDerivation (finalAttrs: {
version = "3.9.0";
pname = "scala-bare";
src = fetchurl {
url = "https://github.com/scala/scala3/releases/download/${finalAttrs.version}/scala3-${finalAttrs.version}.tar.gz";
hash = "sha256-js3e4z7NpiAlbkt0S5KNOtbeZGU71B5LajCJkrO2uzE=";
};
propagatedBuildInputs = [
jre
ncurses.dev
];
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out
mv * $out
'';
# Use preFixup instead of fixupPhase
# because we want the default fixupPhase as well
preFixup = ''
bin_files=$(find $out/bin -type f ! -name "*common*" ! -name "scala-cli.jar")
for f in $bin_files ; do
wrapProgram $f --set JAVA_HOME ${jre} --prefix PATH : '${ncurses.dev}/bin'
done
'';
meta = {
description = "Scala 3 compiler, also known as Dotty";
homepage = "https://scala-lang.org/";
license = lib.licenses.asl20;
platforms = lib.platforms.all;
mainProgram = "scala";
maintainers = with lib.maintainers; [
virusdave
kashw2
natsukagami
hamzaremmal
dottybot
turebentzin
];
};
})
|