Merge pull request #120092 from ericdallo/bump-clojure-lsp
clojure-lsp: 2021.02.14-19.46.47 -> 2021.04.13-12.47.33
This commit is contained in:
commit
cf628a338d
2 changed files with 11 additions and 61 deletions
|
@ -1,39 +1,29 @@
|
|||
{ lib, stdenv, callPackage, fetchFromGitHub, leiningen, openjdk11
|
||||
, graalvm11-ce, babashka }:
|
||||
{ lib, stdenv, graalvm11-ce, babashka, fetchurl, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "clojure-lsp";
|
||||
version = "2021.02.14-19.46.47";
|
||||
leiningen11 = leiningen.override ({ jdk = openjdk11; });
|
||||
version = "2021.04.13-12.47.33";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-Zj7/8RcuxCy2xdd+5jeOb1GTsQsX0EVW32k32fA6uf4=";
|
||||
sha256 = "1la0d28pvp1fqnxp3scb2vawcblilwyx42djxn379vag403p1i2d";
|
||||
};
|
||||
|
||||
repository = callPackage ./repository.nix {
|
||||
inherit src pname version;
|
||||
leiningen = leiningen11;
|
||||
jar = fetchurl {
|
||||
url = "https://github.com/clojure-lsp/clojure-lsp/releases/download/${version}/clojure-lsp.jar";
|
||||
sha256 = "059gz7y2rzwdxpyqy80w4lghzgxi5lb4rxmks1721yq6k7ljjyqy";
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
inherit src pname version;
|
||||
|
||||
postPatch = ''
|
||||
# Hack to set maven cache in another directory since MAVEN_OPTS doesn't work
|
||||
substituteInPlace project.clj \
|
||||
--replace ":main" ":local-repo \"${repository}\" :main"
|
||||
'';
|
||||
|
||||
GRAALVM_HOME = graalvm11-ce;
|
||||
CLOJURE_LSP_JAR = jar;
|
||||
|
||||
buildInputs = [ graalvm11-ce leiningen11 repository ];
|
||||
buildInputs = [ graalvm11-ce ];
|
||||
|
||||
buildPhase = with lib; ''
|
||||
runHook preBuild
|
||||
|
||||
export LEIN_HOME="$(mktemp -d)"
|
||||
bash ./graalvm/native-unix-compile.sh
|
||||
|
||||
runHook postBuild
|
||||
|
@ -51,14 +41,14 @@ in stdenv.mkDerivation rec {
|
|||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
${babashka}/bin/bb ./integration-test/run-all.clj ./clojure-lsp
|
||||
${babashka}/bin/bb integration-test/run-all.clj ./clojure-lsp
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Language Server Protocol (LSP) for Clojure";
|
||||
homepage = "https://github.com/snoe/clojure-lsp";
|
||||
homepage = "https://github.com/clojure-lsp/clojure-lsp";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.ericdallo ];
|
||||
platforms = graalvm11-ce.meta.platforms;
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
{ lib, stdenv, src, pname, version, leiningen }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit src;
|
||||
|
||||
name = "${pname}-${version}-repository";
|
||||
buildInputs = [ leiningen ];
|
||||
|
||||
postPatch = ''
|
||||
# Hack to set maven cache in another directory since MAVEN_OPTS doesn't work
|
||||
substituteInPlace project.clj \
|
||||
--replace ":main" ":local-repo \"$out\" :main"
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
export LEIN_HOME="$(mktemp -d)"
|
||||
lein with-profiles +native-image deps
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
find $out -type f \
|
||||
-name \*.lastUpdated -or \
|
||||
-name resolver-status.properties -or \
|
||||
-name _remote.repositories \
|
||||
-delete
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
dontFixup = true;
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "sha256-aWZPsJF32ENyYNZCHf5amxVF9pb+5M73JqG/OITZlak=";
|
||||
}
|
Loading…
Reference in a new issue