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