clojure-lsp: add tests
This commit is contained in:
parent
3fa00685ce
commit
cd98c0e4ba
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl, graalvm11-ce }:
|
||||
{ lib, stdenv, fetchurl, fetchFromGitHub, graalvm11-ce, babashka }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "clojure-lsp";
|
||||
@ -9,6 +9,14 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-fLwubRwWa1fu37bdkaCr2uZK79z37wqPLToOb5BlegY=";
|
||||
};
|
||||
|
||||
# For tests
|
||||
ghSrc = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1ydf8bgwvjp77wyhjqwzn7crpn5hxmq701czlkhpm5ablnxcwhn7";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
buildInputs = [ graalvm11-ce ];
|
||||
@ -21,6 +29,7 @@ stdenv.mkDerivation rec {
|
||||
"-J-Dclojure.spec.skip-macros=true"
|
||||
"-H:+ReportExceptionStackTraces"
|
||||
"--enable-url-protocols=jar"
|
||||
# TODO: Enable in GraalVM 21.0.0
|
||||
# "-H:+InlineBeforeAnalysis"
|
||||
"-H:Log=registerResource:"
|
||||
"--verbose"
|
||||
@ -49,8 +58,9 @@ stdenv.mkDerivation rec {
|
||||
install -Dm755 clojure-lsp $out/bin/clojure-lsp
|
||||
'';
|
||||
|
||||
installCheckPhase = ''
|
||||
$out/bin/clojure-lsp --version
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
${babashka}/bin/bb ${ghSrc}/integration-test/run-all.clj ./clojure-lsp
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user