ocamlPackages.lsp: 1.17.0 → 1.18.0
This commit is contained in:
parent
ff58909840
commit
6b06a9c2ac
@ -1,4 +1,5 @@
|
||||
{ lib
|
||||
, ocaml
|
||||
, buildDunePackage
|
||||
, lsp
|
||||
, xdg
|
||||
@ -11,18 +12,30 @@
|
||||
, merlin-lib
|
||||
, astring
|
||||
, camlp-streams
|
||||
, base
|
||||
}:
|
||||
|
||||
# Freeze ocaml-lsp-version at 1.17.0 for OCaml 5.0
|
||||
# for which merlin 4.16 is not available
|
||||
let lsp_v =
|
||||
if lib.versions.majorMinor ocaml.version == "5.0"
|
||||
then lsp.override { version = "1.17.0"; }
|
||||
else lsp
|
||||
; in
|
||||
|
||||
let lsp = lsp_v; in
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "ocaml-lsp-server";
|
||||
inherit (lsp) version src preBuild;
|
||||
duneVersion = "3";
|
||||
|
||||
buildInputs = lsp.buildInputs ++ [ lsp re ]
|
||||
++ lib.optional (lib.versionAtLeast version "1.9") spawn
|
||||
++ lib.optionals (lib.versionAtLeast version "1.10") [ fiber xdg ]
|
||||
++ lib.optional (lib.versionAtLeast version "1.14.2") ocamlc-loc
|
||||
++ lib.optionals (lib.versionAtLeast version "1.17.0") [ astring camlp-streams merlin-lib ];
|
||||
++ lib.optionals (lib.versionAtLeast version "1.17.0") [ astring camlp-streams merlin-lib ]
|
||||
++ lib.optional (lib.versionAtLeast version "1.18.0") base
|
||||
;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
, ocaml
|
||||
, version ?
|
||||
if lib.versionAtLeast ocaml.version "4.14" then
|
||||
"1.17.0"
|
||||
"1.18.0"
|
||||
else if lib.versionAtLeast ocaml.version "4.13" then
|
||||
"1.10.5"
|
||||
else if lib.versionAtLeast ocaml.version "4.12" then
|
||||
@ -19,6 +19,11 @@
|
||||
}:
|
||||
|
||||
let params = {
|
||||
"1.18.0" = {
|
||||
name = "lsp";
|
||||
minimalOCamlVersion = "4.14";
|
||||
sha256 = "sha256-tZ2kPM/S/9J3yeX2laDjnHLA144b8svy9iwae32nXwM=";
|
||||
};
|
||||
"1.17.0" = {
|
||||
name = "lsp";
|
||||
minimalOCamlVersion = "4.14";
|
||||
@ -54,7 +59,6 @@ buildDunePackage rec {
|
||||
inherit (params) sha256;
|
||||
};
|
||||
|
||||
duneVersion = "3";
|
||||
inherit (params) minimalOCamlVersion;
|
||||
|
||||
buildInputs =
|
||||
|
@ -23,7 +23,7 @@
|
||||
, ocaml
|
||||
, version ?
|
||||
if lib.versionAtLeast ocaml.version "4.14" then
|
||||
"1.17.0"
|
||||
"1.18.0"
|
||||
else if lib.versionAtLeast ocaml.version "4.13" then
|
||||
"1.10.5"
|
||||
else if lib.versionAtLeast ocaml.version "4.12" then
|
||||
@ -38,7 +38,6 @@ let jsonrpc_v = jsonrpc.override {
|
||||
buildDunePackage rec {
|
||||
pname = "lsp";
|
||||
inherit (jsonrpc_v) version src;
|
||||
duneVersion = "3";
|
||||
minimalOCamlVersion =
|
||||
if lib.versionAtLeast version "1.7.0" then
|
||||
"4.12"
|
||||
|
Loading…
Reference in New Issue
Block a user