2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, jre, makeWrapper }:
|
2019-12-06 23:45:12 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "clojure-lsp";
|
2021-02-16 03:53:39 +00:00
|
|
|
version = "2021.02.14-19.46.47";
|
2019-12-06 23:45:12 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-01-03 01:53:15 +00:00
|
|
|
url = "https://github.com/clojure-lsp/clojure-lsp/releases/download/${version}/${pname}.jar";
|
2021-02-16 03:53:39 +00:00
|
|
|
sha256 = "sha256-fLwubRwWa1fu37bdkaCr2uZK79z37wqPLToOb5BlegY=";
|
2019-12-06 23:45:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
2020-12-28 15:59:15 +00:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2019-12-06 23:45:12 +00:00
|
|
|
installPhase = ''
|
2020-12-28 15:59:15 +00:00
|
|
|
install -Dm644 $src $out/share/java/${pname}.jar
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/${pname} \
|
|
|
|
--add-flags "-Xmx2g" \
|
2021-01-03 01:53:15 +00:00
|
|
|
--add-flags "-server" \
|
|
|
|
--add-flags "-jar $out/share/java/${pname}.jar"
|
2019-12-06 23:45:12 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2019-12-06 23:45:12 +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;
|
|
|
|
};
|
|
|
|
}
|