Files
nixpkgs/pkgs/by-name/ko/kotlin-language-server/package.nix
quantenzitrone 6b61249106 various: switch to finalAttrs pattern
this shouldn't create any rebuilds
2026-01-30 02:36:22 +01:00

60 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchzip,
openjdk,
gradle,
makeWrapper,
maven,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "kotlin-language-server";
version = "1.3.13";
src = fetchzip {
url = "https://github.com/fwcd/kotlin-language-server/releases/download/${finalAttrs.version}/server.zip";
hash = "sha256-ypiOeXA+14Js31WPGJAdSjskQJR9sBPVWGecLkKHiN4=";
};
dontBuild = true;
installPhase = ''
mkdir -p $out/lib
mkdir -p $out/bin
cp -r lib/* $out/lib
cp -r bin/* $out/bin
'';
nativeBuildInputs = [
gradle
makeWrapper
];
buildInputs = [
openjdk
gradle
];
postFixup = ''
wrapProgram "$out/bin/kotlin-language-server" --set JAVA_HOME ${openjdk} --prefix PATH : ${
lib.strings.makeBinPath [
openjdk
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";
changelog = "https://github.com/fwcd/kotlin-language-server/blob/${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
mainProgram = "kotlin-language-server";
};
})