home-assistant: support lightify component (#379007)
[NixPkgs.git] / pkgs / development / compilers / kotlin / default.nix
blob329e1a731e5a1936ce331128d5b9c570dd854e1d
1 { lib, stdenv, fetchurl, makeWrapper, jre, unzip }:
3 stdenv.mkDerivation (finalAttrs: {
4   pname = "kotlin";
5   version = "2.1.0";
7   src = fetchurl {
8     url = "https://github.com/JetBrains/kotlin/releases/download/v${finalAttrs.version}/kotlin-compiler-${finalAttrs.version}.zip";
9     sha256 = "sha256-tmmNVyitj57c3QFhfWOAcxkdigMTnMU4o5G043Wa0pc=";
10   };
12   propagatedBuildInputs = [ jre ] ;
13   nativeBuildInputs = [ makeWrapper unzip ];
15   installPhase = ''
16     mkdir -p $out
17     rm "bin/"*.bat
18     mv * $out
20     for p in $(ls $out/bin/) ; do
21       wrapProgram $out/bin/$p --prefix PATH ":" ${jre}/bin ;
22     done
24     if [ -f $out/LICENSE ]; then
25       install -D $out/LICENSE $out/share/kotlin/LICENSE
26       rm $out/LICENSE
27     fi
28   '';
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   };