2021-04-21 17:55:55 +00:00
|
|
|
{ lib, stdenv, graalvm11-ce, babashka, fetchurl, fetchFromGitHub }:
|
2019-12-06 23:45:12 +00:00
|
|
|
|
2021-04-21 17:55:55 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-12-06 23:45:12 +00:00
|
|
|
pname = "clojure-lsp";
|
2021-06-09 17:21:39 +00:00
|
|
|
version = "2021.06.01-16.19.44";
|
2019-12-06 23:45:12 +00:00
|
|
|
|
2021-02-05 14:13:00 +00:00
|
|
|
src = fetchFromGitHub {
|
2021-02-04 03:56:20 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-06-09 17:21:39 +00:00
|
|
|
sha256 = "sha256-dACvjm+uEVWotoeYhA4gCenKeprpF2dI0PGNRAVALao=";
|
2021-02-05 14:13:00 +00:00
|
|
|
};
|
|
|
|
|
2021-04-21 17:55:55 +00:00
|
|
|
jar = fetchurl {
|
|
|
|
url = "https://github.com/clojure-lsp/clojure-lsp/releases/download/${version}/clojure-lsp.jar";
|
2021-06-09 17:21:39 +00:00
|
|
|
sha256 = "sha256-V12rSYv/Yu12ZpLSROd+4pyGiEGRfJ7lmRqCeikcQ5Q=";
|
2021-02-04 03:56:20 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 14:13:00 +00:00
|
|
|
GRAALVM_HOME = graalvm11-ce;
|
2021-04-21 17:55:55 +00:00
|
|
|
CLOJURE_LSP_JAR = jar;
|
2019-12-06 23:45:12 +00:00
|
|
|
|
2021-04-21 17:55:55 +00:00
|
|
|
buildInputs = [ graalvm11-ce ];
|
2021-02-04 03:06:28 +00:00
|
|
|
|
|
|
|
buildPhase = with lib; ''
|
2021-02-05 14:13:00 +00:00
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
bash ./graalvm/native-unix-compile.sh
|
|
|
|
|
|
|
|
runHook postBuild
|
2021-02-04 03:06:28 +00:00
|
|
|
'';
|
2020-12-28 15:59:15 +00:00
|
|
|
|
2019-12-06 23:45:12 +00:00
|
|
|
installPhase = ''
|
2021-02-05 14:13:00 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 ./clojure-lsp $out/bin/clojure-lsp
|
|
|
|
|
|
|
|
runHook postInstall
|
2021-02-04 03:06:28 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-04 03:56:20 +00:00
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
2021-02-05 14:13:00 +00:00
|
|
|
runHook preCheck
|
|
|
|
|
2021-06-09 17:21:39 +00:00
|
|
|
export HOME="$(mktemp -d)"
|
|
|
|
./clojure-lsp --version | fgrep -q '${version}'
|
2021-04-21 17:55:55 +00:00
|
|
|
${babashka}/bin/bb integration-test/run-all.clj ./clojure-lsp
|
2021-02-05 14:13:00 +00:00
|
|
|
|
|
|
|
runHook postCheck
|
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";
|
2021-04-21 17:55:55 +00:00
|
|
|
homepage = "https://github.com/clojure-lsp/clojure-lsp";
|
2019-12-06 23:45:12 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.ericdallo ];
|
2021-02-04 03:06:28 +00:00
|
|
|
platforms = graalvm11-ce.meta.platforms;
|
2019-12-06 23:45:12 +00:00
|
|
|
};
|
|
|
|
}
|