at master 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 makeWrapper, 6 jre, 7 unzip, 8}: 9 10stdenv.mkDerivation (finalAttrs: { 11 pname = "kotlin"; 12 version = "2.2.20"; 13 14 src = fetchurl { 15 url = "https://github.com/JetBrains/kotlin/releases/download/v${finalAttrs.version}/kotlin-compiler-${finalAttrs.version}.zip"; 16 sha256 = "sha256-gfAmTJBztcu9s/+EGM8sXawHaHn8FW+hpkYvWlrMRCA="; 17 }; 18 19 propagatedBuildInputs = [ jre ]; 20 nativeBuildInputs = [ 21 makeWrapper 22 unzip 23 ]; 24 25 installPhase = '' 26 mkdir -p $out 27 rm "bin/"*.bat 28 mv * $out 29 30 for p in $(ls $out/bin/) ; do 31 wrapProgram $out/bin/$p --prefix PATH ":" ${jre}/bin ; 32 done 33 34 if [ -f $out/LICENSE ]; then 35 install -D $out/LICENSE $out/share/kotlin/LICENSE 36 rm $out/LICENSE 37 fi 38 ''; 39 40 meta = { 41 description = "General purpose programming language"; 42 longDescription = '' 43 Kotlin is a statically typed language that targets the JVM and JavaScript. 44 It is a general-purpose language intended for industry use. 45 It is developed by a team at JetBrains although it is an OSS language 46 and has external contributors. 47 ''; 48 homepage = "https://kotlinlang.org/"; 49 license = lib.licenses.asl20; 50 maintainers = with lib.maintainers; [ SubhrajyotiSen ]; 51 platforms = lib.platforms.all; 52 }; 53})