2020-12-28 16:59:15 +01:00
|
|
|
{ stdenv, fetchurl, jre, makeWrapper }:
|
2019-12-07 00:45:12 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "clojure-lsp";
|
2021-01-21 14:31:34 +01:00
|
|
|
version = "2021.01.20-01.39.32";
|
2019-12-07 00:45:12 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-01-03 02:53:15 +01:00
|
|
|
url = "https://github.com/clojure-lsp/clojure-lsp/releases/download/${version}/${pname}.jar";
|
2021-01-21 14:31:34 +01:00
|
|
|
sha256 = "sha256-DqvAIM5YHtcUNZHoH+fcZym6EaPX5a/vgphTFfTO6bU=";
|
2019-12-07 00:45:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
2020-12-28 16:59:15 +01:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2019-12-07 00:45:12 +01:00
|
|
|
installPhase = ''
|
2020-12-28 16:59:15 +01:00
|
|
|
install -Dm644 $src $out/share/java/${pname}.jar
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/${pname} \
|
|
|
|
--add-flags "-Xmx2g" \
|
2021-01-03 02:53:15 +01:00
|
|
|
--add-flags "-server" \
|
|
|
|
--add-flags "-jar $out/share/java/${pname}.jar"
|
2019-12-07 00:45:12 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Language Server Protocol (LSP) for Clojure";
|
|
|
|
homepage = "https://github.com/snoe/clojure-lsp";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.ericdallo ];
|
|
|
|
platforms = jre.meta.platforms;
|
|
|
|
};
|
|
|
|
}
|