567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
makeWrapper,
|
|
jre,
|
|
ncurses,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
version = "3.3.6";
|
|
pname = "scala-bare";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/scala/scala3/releases/download/${finalAttrs.version}/scala3-${finalAttrs.version}.tar.gz";
|
|
hash = "sha256-cmdSQkDuKJl2/tG4vAjABF1dKQ0/ruB8a3E3pCUrW5c=";
|
|
};
|
|
|
|
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
|
|
];
|
|
};
|
|
})
|