Merge pull request #164568 from vtuan10/kotlin-language-server-fix

kotlin-language-server: fix missing JDK in PATH
This commit is contained in:
ajs124
2022-04-10 21:37:17 +01:00
committed by GitHub
@@ -1,11 +1,11 @@
{ lib, stdenv, fetchurl, unzip, openjdk11, gradle }:
{ lib, stdenv, fetchzip, openjdk11, gradle, makeWrapper, maven }:
stdenv.mkDerivation rec {
pname = "kotlin-language-server";
version = "1.3.0";
src = fetchurl {
src = fetchzip {
url = "https://github.com/fwcd/kotlin-language-server/releases/download/${version}/server.zip";
sha256 = "sha256-yyqI+87vtggSeAfb3OEftalknqbTDEQ5gTJwB/EMIlY=";
hash = "sha256-nqrZoSntomNLUMTni/yoiVhDOJFSFmZeGze8IJhITu0=";
};
dontBuild = true;
@@ -17,14 +17,19 @@ stdenv.mkDerivation rec {
cp -r bin/* $out/bin
'';
nativeBuildInputs = [ unzip gradle ];
nativeBuildInputs = [ gradle makeWrapper ];
buildInputs = [ openjdk11 gradle ];
postFixup = ''
wrapProgram "$out/bin/kotlin-language-server" --set JAVA_HOME ${openjdk11} --prefix PATH : ${lib.strings.makeBinPath [ openjdk11 maven ] }
'';
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 ];
homepage = "https://github.com/fwcd/kotlin-language-server";
license = lib.licenses.mit;
platforms = lib.platforms.unix;