2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, jre, unzip }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "kotlin";
|
2021-09-23 15:35:13 +00:00
|
|
|
version = "1.5.31";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip";
|
2021-09-23 15:35:13 +00:00
|
|
|
sha256 = "sha256-ZhERKG8+WsBqrzqUA9hp2alqF2tisUGBS+YmpHJJ/p4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ jre ] ;
|
2021-03-19 17:17:44 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper unzip ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
rm "bin/"*.bat
|
|
|
|
mv * $out
|
|
|
|
|
|
|
|
for p in $(ls $out/bin/) ; do
|
|
|
|
wrapProgram $out/bin/$p --prefix PATH ":" ${jre}/bin ;
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -f $out/LICENSE ]; then
|
|
|
|
install -D $out/LICENSE $out/share/kotlin/LICENSE
|
|
|
|
rm $out/LICENSE
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "General purpose programming language";
|
|
|
|
longDescription = ''
|
|
|
|
Kotlin is a statically typed language that targets the JVM and JavaScript.
|
|
|
|
It is a general-purpose language intended for industry use.
|
|
|
|
It is developed by a team at JetBrains although it is an OSS language
|
|
|
|
and has external contributors.
|
|
|
|
'';
|
|
|
|
homepage = "https://kotlinlang.org/";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.asl20;
|
2021-06-28 23:13:55 +00:00
|
|
|
maintainers = with lib.maintainers; [ SubhrajyotiSen ];
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|