2022-11-27 09:42:12 +00:00
|
|
|
{ lib, stdenv, fetchzip, openjdk, gradle, makeWrapper, maven }:
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kotlin-language-server";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "1.3.1";
|
2022-04-15 01:41:22 +00:00
|
|
|
src = fetchzip {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://github.com/fwcd/kotlin-language-server/releases/download/${version}/server.zip";
|
2022-07-14 12:49:19 +00:00
|
|
|
hash = "sha256-FxpNA4OGSgFdILl0yKBDTtVdQl6Bw9tm2eURbsJdZzI=";
|
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 ];
|
2022-11-27 09:42:12 +00:00
|
|
|
buildInputs = [ openjdk gradle ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
postFixup = ''
|
2022-11-27 09:42:12 +00:00
|
|
|
wrapProgram "$out/bin/kotlin-language-server" --set JAVA_HOME ${openjdk} --prefix PATH : ${lib.strings.makeBinPath [ openjdk maven ] }
|
2022-04-15 01:41:22 +00:00
|
|
|
'';
|
|
|
|
|
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";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/fwcd/kotlin-language-server/blob/${version}/CHANGELOG.md";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|