mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-11-11 20:43:00 +01:00
add nix package for wrapped jdtls
This commit is contained in:
parent
c795ad06e1
commit
8b9642f8a4
3 changed files with 13 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./jdtls-wrapped.nix
|
||||
./thumbnailers.nix
|
||||
];
|
||||
}
|
||||
|
|
11
nix/pkgs/jdtls-wrapped.nix
Normal file
11
nix/pkgs/jdtls-wrapped.nix
Normal 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" "$@"
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue