ocamlPackages.ocaml-lsp: init at 1.1.0
This commit is contained in:
parent
83401d1a21
commit
b393908673
2 changed files with 68 additions and 0 deletions
66
pkgs/development/ocaml-modules/ocaml-lsp/default.nix
Normal file
66
pkgs/development/ocaml-modules/ocaml-lsp/default.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ buildDunePackage
|
||||
, stdlib-shims
|
||||
, ppx_yojson_conv_lib
|
||||
, ocaml-syntax-shims
|
||||
, omd
|
||||
, octavius
|
||||
, dune-build-info
|
||||
, uutf
|
||||
, csexp
|
||||
, cmdliner
|
||||
, fetchzip
|
||||
, lib
|
||||
}:
|
||||
let
|
||||
version = "1.1.0";
|
||||
src = fetchzip {
|
||||
url = "https://github.com/ocaml/ocaml-lsp/releases/download/${version}/ocaml-lsp-server-${version}.tbz";
|
||||
sha256 = "0al89waw43jl80k9z06kh44byhjhwb5hmzx07sddwi1kr1vc6jrb";
|
||||
};
|
||||
|
||||
# unvendor some (not all) dependencies.
|
||||
# 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 = ''
|
||||
rm -r vendor/{octavius,uutf,ocaml-syntax-shims,omd,cmdliner}
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
stdlib-shims
|
||||
ppx_yojson_conv_lib
|
||||
ocaml-syntax-shims
|
||||
octavius
|
||||
uutf
|
||||
csexp
|
||||
dune-build-info
|
||||
omd
|
||||
cmdliner
|
||||
];
|
||||
|
||||
lsp = buildDunePackage {
|
||||
pname = "lsp";
|
||||
inherit version src;
|
||||
useDune2 = true;
|
||||
minimumOCamlVersion = "4.06";
|
||||
|
||||
inherit buildInputs preBuild;
|
||||
};
|
||||
|
||||
in
|
||||
buildDunePackage {
|
||||
pname = "ocaml-lsp-server";
|
||||
inherit version src;
|
||||
useDune2 = true;
|
||||
|
||||
inherit preBuild;
|
||||
|
||||
buildInputs = buildInputs ++ [ lsp ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "OCaml Language Server Protocol implementation";
|
||||
license = lib.licenses.isc;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.symphorien ];
|
||||
};
|
||||
}
|
|
@ -654,6 +654,8 @@ let
|
|||
|
||||
ocamlify = callPackage ../development/tools/ocaml/ocamlify { };
|
||||
|
||||
ocaml-lsp = callPackage ../development/ocaml-modules/ocaml-lsp { };
|
||||
|
||||
ocaml-migrate-parsetree = callPackage ../development/ocaml-modules/ocaml-migrate-parsetree { };
|
||||
|
||||
ocamlmod = callPackage ../development/tools/ocaml/ocamlmod { };
|
||||
|
|
Loading…
Reference in a new issue