2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, jre, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "clojure-lsp";
|
2021-02-16 17:04:54 +00:00
|
|
|
version = "2021.02.13-18.04.19";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-01-09 10:05:03 +00:00
|
|
|
url = "https://github.com/clojure-lsp/clojure-lsp/releases/download/${version}/${pname}.jar";
|
2021-02-16 17:04:54 +00:00
|
|
|
sha256 = "sha256-v7+HH77xFxQc0LjVhcrXsdcmmZmrPiMSArxfoOaHkoI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
2021-01-05 17:05:55 +00:00
|
|
|
install -Dm644 $src $out/share/java/${pname}.jar
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/${pname} \
|
|
|
|
--add-flags "-Xmx2g" \
|
2021-01-09 10:05:03 +00:00
|
|
|
--add-flags "-server" \
|
|
|
|
--add-flags "-jar $out/share/java/${pname}.jar"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Language Server Protocol (LSP) for Clojure";
|
|
|
|
homepage = "https://github.com/snoe/clojure-lsp";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.ericdallo ];
|
|
|
|
platforms = jre.meta.platforms;
|
|
|
|
};
|
|
|
|
}
|