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-04-21 17:55:55 +00:00
|
|
|
version = "2021.04.13-12.47.33";
|
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-04-21 17:55:55 +00:00
|
|
|
sha256 = "1la0d28pvp1fqnxp3scb2vawcblilwyx42djxn379vag403p1i2d";
|
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";
|
|
|
|
sha256 = "059gz7y2rzwdxpyqy80w4lghzgxi5lb4rxmks1721yq6k7ljjyqy";
|
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-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
|
|
|
};
|
|
|
|
}
|