nixpkgs/pkgs/development/tools/kotlin-language-server/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.1 KiB
Nix
Raw Normal View History

2022-03-21 10:33:13 +00:00
{ lib, stdenv, fetchzip, openjdk11, gradle, makeWrapper, maven }:
2021-11-13 12:04:58 +00:00
stdenv.mkDerivation rec {
pname = "kotlin-language-server";
2022-07-03 12:19:17 +00:00
version = "1.3.1";
2022-03-21 10:33:13 +00:00
src = fetchzip {
2021-11-13 12:04:58 +00:00
url = "https://github.com/fwcd/kotlin-language-server/releases/download/${version}/server.zip";
2022-07-03 12:19:17 +00:00
hash = "sha256-FxpNA4OGSgFdILl0yKBDTtVdQl6Bw9tm2eURbsJdZzI=";
2021-11-13 12:04:58 +00:00
};
dontBuild = true;
installPhase = ''
mkdir -p $out/lib
mkdir -p $out/bin
cp -r lib/* $out/lib
cp -r bin/* $out/bin
'';
2022-03-21 10:33:13 +00:00
nativeBuildInputs = [ gradle makeWrapper ];
2021-11-13 12:04:58 +00:00
buildInputs = [ openjdk11 gradle ];
postFixup = ''
wrapProgram "$out/bin/kotlin-language-server" --set JAVA_HOME ${openjdk11} --prefix PATH : ${lib.strings.makeBinPath [ openjdk11 maven ] }
'';
2021-11-13 12:04:58 +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'';
maintainers = with lib.maintainers; [ vtuan10 ];
2021-11-13 12:04:58 +00:00
homepage = "https://github.com/fwcd/kotlin-language-server";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
};
}