lol

Merge pull request #142709 from AndersonTorres/new-kotlin-native

kotlin-native: init at 1.5.31

authored by

Anderson Torres and committed by
GitHub
47a8fe3a be28d932

+65
+64
pkgs/development/compilers/kotlin/native.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , jre 5 + , makeWrapper 6 + }: 7 + 8 + stdenv.mkDerivation rec { 9 + pname = "kotlin-native"; 10 + version = "1.5.31"; 11 + 12 + src = let 13 + getArch = { 14 + "aarch64-darwin" = "macos-aarch64"; 15 + "x86_64-darwin" = "macos-x86_64"; 16 + "x86_64-linux" = "linux-x86_64"; 17 + }.${stdenv.system} or (throw "${pname}-${version}: ${stdenv.system} is unsupported."); 18 + 19 + getUrl = version: arch: 20 + "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-native-${arch}-${version}.tar.gz"; 21 + 22 + getHash = arch: { 23 + "macos-aarch64" = "sha256-+9AF42AlPn1/8c14t8u+NN8FkoEmdt6tpmIKU9Rp2AM="; 24 + "macos-x86_64" = "sha256-/eciSo4Eps2TTsv1XU1Rlm+KBmgQT0MWp2s/OAYtGt4="; 25 + "linux-x86_64" = "sha256-Y2t+nlTu+j+h0oRneo7CJx0PmLAkqKYBJ+8go7rargM="; 26 + }.${arch}; 27 + in 28 + fetchurl { 29 + url = getUrl version getArch; 30 + hash = getHash getArch; 31 + }; 32 + 33 + nativeBuildInputs = [ 34 + jre 35 + makeWrapper 36 + ]; 37 + 38 + installPhase = '' 39 + runHook preInstall 40 + 41 + mkdir -p $out 42 + mv * $out 43 + 44 + runHook postInstall 45 + ''; 46 + 47 + postFixup = '' 48 + wrapProgram $out/bin/run_konan --prefix PATH ":" ${lib.makeBinPath [ jre ]} 49 + ''; 50 + 51 + meta = { 52 + homepage = "https://kotlinlang.org/"; 53 + description = "A modern programming language that makes developers happier"; 54 + longDescription = '' 55 + Kotlin/Native is a technology for compiling Kotlin code to native 56 + binaries, which can run without a virtual machine. It is an LLVM based 57 + backend for the Kotlin compiler and native implementation of the Kotlin 58 + standard library. 59 + ''; 60 + license = lib.licenses.asl20; 61 + maintainers = with lib.maintainers; [ ]; 62 + platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin; 63 + }; 64 + }
+1
pkgs/top-level/all-packages.nix
··· 12277 12277 koka = haskell.lib.justStaticExecutables (haskellPackages.callPackage ../development/compilers/koka { }); 12278 12278 12279 12279 kotlin = callPackage ../development/compilers/kotlin { }; 12280 + kotlin-native = callPackage ../development/compilers/kotlin/native.nix { }; 12280 12281 12281 12282 lazarus = callPackage ../development/compilers/fpc/lazarus.nix { 12282 12283 fpc = fpc;