From 978c08a5dea7b1c04401f965479b782024fcc7eb Mon Sep 17 00:00:00 2001 From: luhuaei Date: Sat, 13 Nov 2021 20:04:58 +0800 Subject: [PATCH] Add kotlin-language-server --- .../tools/kotlin-language-server/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/tools/kotlin-language-server/default.nix diff --git a/pkgs/development/tools/kotlin-language-server/default.nix b/pkgs/development/tools/kotlin-language-server/default.nix new file mode 100644 index 000000000000..510cd1f60f30 --- /dev/null +++ b/pkgs/development/tools/kotlin-language-server/default.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchurl, unzip, openjdk11, gradle }: + +stdenv.mkDerivation rec { + pname = "kotlin-language-server"; + version = "1.1.2"; + src = fetchurl { + url = "https://github.com/fwcd/kotlin-language-server/releases/download/${version}/server.zip"; + sha256 = "d8850ee2be8c49e5e642c4a41f52304098ae0bcce009e4d91531a9aeecd64916"; + }; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/lib + mkdir -p $out/bin + cp -r lib/* $out/lib + cp -r bin/* $out/bin + ''; + + nativeBuildInputs = [ unzip gradle ]; + buildInputs = [ openjdk11 gradle ]; + + meta = { + description = "kotlin language server"; + longDescription = '' + About Kotlin code completion, linting and more for any editor/IDE + using the Language Server Protocol Topics''; + homepage = "https://github.com/fwcd/kotlin-language-server"; + license = lib.licenses.mit; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bb92dc9a69b1..a52f1dae1517 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12385,6 +12385,8 @@ with pkgs; kotlin = callPackage ../development/compilers/kotlin { }; kotlin-native = callPackage ../development/compilers/kotlin/native.nix { }; + kotlin-language-server = callPackage ../development/tools/kotlin-language-server {}; + lazarus = callPackage ../development/compilers/fpc/lazarus.nix { fpc = fpc; };