Commit 6b06a9c2 authored by Vincent Laporte's avatar Vincent Laporte Committed by Vincent Laporte
Browse files

ocamlPackages.lsp: 1.17.0 → 1.18.0

parent ff589098
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
{ 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 ];

+6 −2
Original line number Diff line number Diff line
@@ -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 =
+1 −2
Original line number Diff line number Diff line
@@ -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"