ocamlPackages.ocaml-lsp: update
4.14 version is untested as ppxlib does not compile
This commit is contained in:
parent
5063e680eb
commit
c0b6df2b86
|
@ -1,14 +1,13 @@
|
|||
{ lib, buildDunePackage, jsonrpc, lsp, re, makeWrapper, dot-merlin-reader, spawn }:
|
||||
{ lib, buildDunePackage, lsp, xdg, re, fiber, makeWrapper, dot-merlin-reader, spawn }:
|
||||
|
||||
buildDunePackage {
|
||||
buildDunePackage rec {
|
||||
pname = "ocaml-lsp-server";
|
||||
inherit (jsonrpc) version src;
|
||||
useDune2 = true;
|
||||
|
||||
inherit (lsp) preBuild;
|
||||
inherit (lsp) version src preBuild;
|
||||
duneVersion = if lib.versionAtLeast version "1.10.0" then "3" else "2";
|
||||
|
||||
buildInputs = lsp.buildInputs ++ [ lsp re ]
|
||||
++ lib.optional (lib.versionAtLeast jsonrpc.version "1.9") spawn;
|
||||
++ lib.optional (lib.versionAtLeast version "1.9") spawn
|
||||
++ lib.optionals (lib.versionAtLeast version "1.10") [ fiber xdg ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
|
@ -16,7 +15,7 @@ buildDunePackage {
|
|||
wrapProgram $out/bin/ocamllsp --prefix PATH : ${dot-merlin-reader}/bin
|
||||
'';
|
||||
|
||||
meta = jsonrpc.meta // {
|
||||
meta = lsp.meta // {
|
||||
description = "OCaml Language Server Protocol implementation";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,10 +10,14 @@
|
|||
}:
|
||||
|
||||
let params =
|
||||
if lib.versionAtLeast ocaml.version "4.13"
|
||||
if lib.versionAtLeast ocaml.version "4.14"
|
||||
then {
|
||||
version = "1.10.3";
|
||||
sha256 = "sha256-o6wQc7Byi5T0vbARF3LAq69/9wMkOZRQ6rcVa/rBUfE=";
|
||||
version = "1.11.3";
|
||||
sha256 = "sha256-KlMFh05O04I0Xil2B+nL2hUxZw0jaDMUnI23oUwGyhs=";
|
||||
} else if lib.versionAtLeast ocaml.version "4.13"
|
||||
then {
|
||||
version = "1.10.5";
|
||||
sha256 = "sha256-TeJS6t1ruWhWPvWNatrnSUWI6T17XKiosHLYizBDDcw=";
|
||||
} else if lib.versionAtLeast ocaml.version "4.12"
|
||||
then {
|
||||
version = "1.9.0";
|
||||
|
@ -32,7 +36,7 @@ buildDunePackage rec {
|
|||
inherit (params) sha256;
|
||||
};
|
||||
|
||||
useDune2 = true;
|
||||
duneVersion = if lib.versionAtLeast version "1.10.0" then "3" else "2";
|
||||
minimalOCamlVersion = "4.06";
|
||||
|
||||
buildInputs =
|
||||
|
|
|
@ -8,18 +8,23 @@
|
|||
, omd
|
||||
, octavius
|
||||
, dune-build-info
|
||||
, dune-rpc
|
||||
, uutf
|
||||
, dyn
|
||||
, re
|
||||
, pp
|
||||
, stdune
|
||||
, dune_3
|
||||
, csexp
|
||||
, pp
|
||||
, cmdliner
|
||||
, ordering
|
||||
, ocamlformat-rpc-lib
|
||||
}:
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "lsp";
|
||||
inherit (jsonrpc) version src;
|
||||
useDune2 = true;
|
||||
duneVersion = if lib.versionAtLeast version "1.10.0" then "3" else "2";
|
||||
minimumOCamlVersion =
|
||||
if lib.versionAtLeast version "1.7.0" then
|
||||
"4.12"
|
||||
|
@ -30,15 +35,30 @@ buildDunePackage rec {
|
|||
# They are vendored by upstream only because it is then easier to install
|
||||
# ocaml-lsp without messing with your opam switch, but nix should prevent
|
||||
# this type of problems without resorting to vendoring.
|
||||
preBuild = ''
|
||||
preBuild = lib.optionalString (lib.versionOlder version "1.10.4") ''
|
||||
rm -r ocaml-lsp-server/vendor/{octavius,uutf,omd,cmdliner}
|
||||
'';
|
||||
|
||||
buildInputs =
|
||||
if lib.versionAtLeast version "1.7.0" then
|
||||
if lib.versionAtLeast version "1.10.0" then
|
||||
[
|
||||
pp
|
||||
re
|
||||
ppx_yojson_conv_lib
|
||||
octavius
|
||||
dune-build-info
|
||||
dune-rpc
|
||||
omd
|
||||
cmdliner
|
||||
ocamlformat-rpc-lib
|
||||
dyn
|
||||
stdune
|
||||
]
|
||||
else if lib.versionAtLeast version "1.7.0" then
|
||||
[ pp re ppx_yojson_conv_lib octavius dune-build-info omd cmdliner ocamlformat-rpc-lib ]
|
||||
else
|
||||
[ cppo
|
||||
[
|
||||
cppo
|
||||
ppx_yojson_conv_lib
|
||||
ocaml-syntax-shims
|
||||
octavius
|
||||
|
|
Loading…
Reference in a new issue