add nix package for wrapped jdtls

This commit is contained in:
LordMZTE 2024-07-29 17:02:44 +02:00
parent c795ad06e1
commit 8b9642f8a4
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
3 changed files with 13 additions and 1 deletions

View file

@ -23,7 +23,7 @@ let
nativeBuildInputs = with pkgs; [ zig_0_12.hook git ];
})
(pkgs.callPackage ./haxe-language-server.nix { })
jdt-language-server
config.output.packages.jdtls-wrapped
lua-language-server
(flakePkg "github:oxalica/nil")
ocamlPackages.ocaml-lsp

View file

@ -1,6 +1,7 @@
{ ... }:
{
imports = [
./jdtls-wrapped.nix
./thumbnailers.nix
];
}

View file

@ -0,0 +1,11 @@
# A wrapper around jdtls that provides the correct Java version
{ pkgs, ... }:
{
output.packages.jdtls-wrapped = pkgs.writeShellScriptBin "jdtls" ''
export PATH="$PATH:${pkgs.jre17_minimal}/bin"
export JAVA_HOME="${pkgs.jre17_minimal}"
exec "${pkgs.jdt-language-server}/bin/jdtls" "$@"
'';
}