push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,89 @@
{
lib,
ocaml,
buildDunePackage,
lsp,
xdg,
re,
fiber,
makeWrapper,
dot-merlin-reader,
spawn,
ocamlc-loc,
merlin,
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
# Use merlin < 4.17 for OCaml < 5.2
let
merlin-lib_v =
if lib.versions.majorMinor ocaml.version == "4.14" then
merlin-lib.override {
merlin = merlin.override {
version = "4.16-414";
};
}
else if lib.versions.majorMinor ocaml.version == "5.1" then
merlin-lib.override {
merlin = merlin.override {
version = "4.16-501";
};
}
else
merlin-lib;
in
let
merlin-lib = merlin-lib_v;
in
buildDunePackage rec {
pname = "ocaml-lsp-server";
inherit (lsp) version src preBuild;
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.optional (lib.versionAtLeast version "1.18.0") base;
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/ocamllsp --prefix PATH : ${dot-merlin-reader}/bin
'';
meta = lsp.meta // {
description = "OCaml Language Server Protocol implementation";
mainProgram = "ocamllsp";
};
}

View File

@@ -0,0 +1,115 @@
{
buildDunePackage,
stdlib-shims,
ppx_yojson_conv_lib,
ocaml-syntax-shims,
yojson,
result,
fetchurl,
lib,
ocaml,
version ?
if lib.versionAtLeast ocaml.version "5.3" then
"1.23.1"
else if lib.versionAtLeast ocaml.version "5.2" then
"1.21.0"
else if lib.versionAtLeast ocaml.version "4.14" then
"1.18.0"
else if lib.versionAtLeast ocaml.version "4.13" then
"1.10.5"
else if lib.versionAtLeast ocaml.version "4.12" then
"1.9.0"
else
"1.4.1",
}:
let
params =
{
"1.23.1" = {
name = "lsp";
minimalOCamlVersion = "5.3";
sha256 = "sha256-x0fjlAJmOeogRGfoWd6T6o6ZWNv0T3gNyyoYl8VtdXE=";
};
"1.22.0" = {
name = "lsp";
minimalOCamlVersion = "5.2";
sha256 = "sha256-UZ3DV30V3CIQ3vpYBIGnQ1eRGNUGk7aRuxDLyCA/tYE=";
};
"1.21.0" = {
name = "lsp";
minimalOCamlVersion = "5.2";
sha256 = "sha256-Z4cDN/8j0NK6Q3dL+1io/eBJd+o32k0txQDtC1fO9xc=";
};
"1.18.0" = {
name = "lsp";
minimalOCamlVersion = "4.14";
sha256 = "sha256-tZ2kPM/S/9J3yeX2laDjnHLA144b8svy9iwae32nXwM=";
};
"1.17.0" = {
name = "lsp";
minimalOCamlVersion = "4.14";
sha256 = "sha256-j7i71xfu/SYItNg0WBBbZg4N46ETTcj8IWrmWdTRlgA=";
};
"1.14.2" = {
name = "lsp";
minimalOCamlVersion = "4.14";
sha256 = "sha256-1R+HYaGbPLGDs5DMN3jmnrZFMhMmPUHgF+s+yNzIVJQ=";
};
"1.10.5" = {
name = "jsonrpc";
minimalOCamlVersion = "4.13";
sha256 = "sha256-TeJS6t1ruWhWPvWNatrnSUWI6T17XKiosHLYizBDDcw=";
};
"1.9.0" = {
name = "jsonrpc";
minimalOCamlVersion = "4.12";
sha256 = "sha256:1ac44n6g3rf84gvhcca545avgf9vpkwkkkm0s8ipshfhp4g4jikh";
};
"1.4.1" = {
name = "jsonrpc";
minimalOCamlVersion = "4.06";
sha256 = "1ssyazc0yrdng98cypwa9m3nzfisdzpp7hqnx684rqj8f0g3gs6f";
};
}
."${version}";
in
buildDunePackage rec {
pname = "jsonrpc";
inherit version;
src = fetchurl {
url = "https://github.com/ocaml/ocaml-lsp/releases/download/${version}/${params.name}-${version}.tbz";
inherit (params) sha256;
};
inherit (params) minimalOCamlVersion;
buildInputs =
if lib.versionAtLeast version "1.7.0" then
[ ]
else
[
yojson
stdlib-shims
ocaml-syntax-shims
];
propagatedBuildInputs =
if lib.versionAtLeast version "1.23.1" then
[ yojson ]
else if lib.versionAtLeast version "1.7.0" then
[ ]
else
[
ppx_yojson_conv_lib
result
];
meta = with lib; {
description = "Jsonrpc protocol implementation in OCaml";
license = licenses.isc;
platforms = platforms.unix;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,146 @@
{
buildDunePackage,
lib,
cppo,
stdlib-shims,
ppx_yojson_conv_lib,
ocaml-syntax-shims,
jsonrpc,
omd,
octavius,
dune-build-info,
dune-rpc,
uutf,
dyn,
re,
stdune,
chrome-trace,
csexp,
result,
pp,
cmdliner,
ordering,
ocamlformat-rpc-lib,
ocaml,
version ?
if lib.versionAtLeast ocaml.version "5.3" then
"1.23.1"
else if lib.versionAtLeast ocaml.version "5.2" then
"1.21.0"
else if lib.versionAtLeast ocaml.version "4.14" then
"1.18.0"
else if lib.versionAtLeast ocaml.version "4.13" then
"1.10.5"
else if lib.versionAtLeast ocaml.version "4.12" then
"1.9.0"
else
"1.4.1",
}:
let
jsonrpc_v = jsonrpc.override {
inherit version;
};
in
buildDunePackage rec {
pname = "lsp";
inherit (jsonrpc_v) version src;
minimalOCamlVersion = if lib.versionAtLeast version "1.7.0" then "4.12" else "4.06";
# 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 = lib.optionalString (lib.versionOlder version "1.10.4") ''
rm -r ocaml-lsp-server/vendor/{octavius,uutf,omd,cmdliner}
'';
buildInputs =
if lib.versionAtLeast version "1.12.0" then
[
pp
re
ppx_yojson_conv_lib
octavius
dune-build-info
dune-rpc
omd
cmdliner
ocamlformat-rpc-lib
dyn
stdune
chrome-trace
]
else 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
[
re
octavius
dune-build-info
omd
cmdliner
ocamlformat-rpc-lib
]
else
[
ppx_yojson_conv_lib
ocaml-syntax-shims
octavius
dune-build-info
omd
cmdliner
];
nativeBuildInputs = lib.optional (lib.versionOlder version "1.7.0") cppo;
propagatedBuildInputs =
if lib.versionAtLeast version "1.14.0" then
[
jsonrpc
ppx_yojson_conv_lib
uutf
]
else if lib.versionAtLeast version "1.10.0" then
[
dyn
jsonrpc
ordering
ppx_yojson_conv_lib
stdune
uutf
]
else if lib.versionAtLeast version "1.7.0" then
[
csexp
jsonrpc
(pp.override { version = "1.2.0"; })
ppx_yojson_conv_lib
result
uutf
]
else
[
csexp
jsonrpc
ppx_yojson_conv_lib
stdlib-shims
uutf
];
meta = jsonrpc.meta // {
description = "LSP protocol implementation in OCaml";
};
}