nixpkgs/pkgs/by-name/ko/kotlin-language-server/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

40 lines
1.2 KiB
Nix

{ lib, stdenv, fetchzip, openjdk, gradle, makeWrapper, maven }:
stdenv.mkDerivation rec {
pname = "kotlin-language-server";
version = "1.3.12";
src = fetchzip {
url = "https://github.com/fwcd/kotlin-language-server/releases/download/${version}/server.zip";
hash = "sha256-poWaU0vZS1cpMbbvN7/s1RRUKhekdfTi08fF/IZsVGs=";
};
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/${version}/CHANGELOG.md";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
};
}