2022-04-15 01:41:22 +00:00
|
|
|
{ lib, stdenv, fetchzip, openjdk11, gradle, makeWrapper, maven }:
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kotlin-language-server";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "1.3.0";
|
|
|
|
src = fetchzip {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://github.com/fwcd/kotlin-language-server/releases/download/${version}/server.zip";
|
2022-04-15 01:41:22 +00:00
|
|
|
hash = "sha256-nqrZoSntomNLUMTni/yoiVhDOJFSFmZeGze8IJhITu0=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -r lib/* $out/lib
|
|
|
|
cp -r bin/* $out/bin
|
|
|
|
'';
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
nativeBuildInputs = [ gradle makeWrapper ];
|
2021-12-06 16:07:01 +00:00
|
|
|
buildInputs = [ openjdk11 gradle ];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
postFixup = ''
|
|
|
|
wrapProgram "$out/bin/kotlin-language-server" --set JAVA_HOME ${openjdk11} --prefix PATH : ${lib.strings.makeBinPath [ openjdk11 maven ] }
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = {
|
|
|
|
description = "kotlin language server";
|
|
|
|
longDescription = ''
|
|
|
|
About Kotlin code completion, linting and more for any editor/IDE
|
|
|
|
using the Language Server Protocol Topics'';
|
2022-04-15 01:41:22 +00:00
|
|
|
maintainers = with lib.maintainers; [ vtuan10 ];
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/fwcd/kotlin-language-server";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|