coqPackages: fix serapi & coq-lsp (#355995)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--- a/coq/loader.ml 2024-11-14 17:54:36.562137810 +0100
|
||||
+++ b/coq/loader.ml 2024-11-14 17:55:01.485154767 +0100
|
||||
@@ -81,7 +81,7 @@
|
||||
Exninfo.iraise iexn
|
||||
|
||||
let plugin_handler user_loader =
|
||||
- let loader = Option.default (Fl_dynload.load_packages ~debug:false) user_loader in
|
||||
+ let loader = Option.default (Fl_dynload.load_packages ?loadfile:None ~debug:false) user_loader in
|
||||
let safe_loader = safe_loader loader in
|
||||
fun fl_pkg ->
|
||||
let _, fl_pkg = Mltop.PluginSpec.repr fl_pkg in
|
||||
@@ -32,7 +32,7 @@
|
||||
'';
|
||||
|
||||
propagatedBuildInputs =
|
||||
with coq.ocamlPackages; [ dune-build-info menhir uri yojson ];
|
||||
with coq.ocamlPackages; [ dune-build-info menhir result uri yojson ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Language Server Protocol and VS Code Extension for Coq";
|
||||
@@ -49,4 +49,6 @@
|
||||
else
|
||||
[ cmdliner ppx_deriving ppx_deriving_yojson ppx_import ppx_sexp_conv
|
||||
ppx_compare ppx_hash sexplib ]);
|
||||
|
||||
patches = lib.optional (lib.versions.isEq "0.1.8" o.version) ./coq-loader.patch;
|
||||
})
|
||||
|
||||
@@ -42,8 +42,6 @@ in
|
||||
with coq.ocamlPackages; [
|
||||
cmdliner
|
||||
findlib # run time dependency of SerAPI
|
||||
ppx_deriving
|
||||
ppx_import
|
||||
ppx_sexp_conv
|
||||
ppx_hash
|
||||
sexplib
|
||||
@@ -63,6 +61,7 @@ in
|
||||
};
|
||||
}).overrideAttrs(o:
|
||||
if lib.versions.isLe "8.19.0+0.19.3" o.version && o.version != "dev" then
|
||||
let ppx_deriving = coq.ocamlPackages.ppx_deriving.override { version = "5.2.1"; }; in
|
||||
let inherit (o) version; in {
|
||||
src = fetchzip {
|
||||
url =
|
||||
@@ -73,7 +72,7 @@ if lib.versions.isLe "8.19.0+0.19.3" o.version && o.version != "dev" then
|
||||
sha256 = release."${version}".sha256;
|
||||
};
|
||||
|
||||
patches =
|
||||
patches = lib.optional (lib.versions.isGe "8.16" version) ./sertop.patch ++ (
|
||||
if version == "8.10.0+0.7.2"
|
||||
then [
|
||||
./8.10.0+0.7.2.patch
|
||||
@@ -95,10 +94,16 @@ if lib.versions.isLe "8.19.0+0.19.3" o.version && o.version != "dev" then
|
||||
./janestreet-0.16.patch
|
||||
]
|
||||
else [
|
||||
];
|
||||
]);
|
||||
|
||||
propagatedBuildInputs = o.propagatedBuildInputs
|
||||
++ (with coq.ocamlPackages; [ ppx_deriving_yojson yojson zarith ]) # zarith needed because of Coq
|
||||
++ (with coq.ocamlPackages; [
|
||||
ppx_deriving
|
||||
(ppx_deriving_yojson.override { inherit ppx_deriving; })
|
||||
(ppx_import.override { inherit ppx_deriving; })
|
||||
yojson
|
||||
zarith # zarith needed because of Coq
|
||||
])
|
||||
; }
|
||||
else
|
||||
{ propagatedBuildInputs = o.propagatedBuildInputs ++ [ coq-lsp ]; }
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/sertop/sertop_loader.ml 2024-11-14 11:49:00.887576232 +0100
|
||||
+++ b/sertop/sertop_loader.ml 2024-11-14 11:49:32.433659096 +0100
|
||||
@@ -51,7 +51,7 @@
|
||||
else None
|
||||
|
||||
let plugin_handler user_handler =
|
||||
- let loader = Option.default (Fl_dynload.load_packages ~debug:false) user_handler in
|
||||
+ let loader = Option.default (Fl_dynload.load_packages ?loadfile:None ~debug:false) user_handler in
|
||||
fun fl_pkg ->
|
||||
try
|
||||
let _, fl_pkg = Mltop.PluginSpec.repr fl_pkg in
|
||||
@@ -10,31 +10,27 @@
|
||||
, ounit
|
||||
, ounit2
|
||||
, ocaml-migrate-parsetree
|
||||
, version ?
|
||||
if lib.versionAtLeast ppxlib.version "0.32" then "6.0.3"
|
||||
else if lib.versionAtLeast ppxlib.version "0.20" then "5.2.1"
|
||||
else if lib.versionAtLeast ppxlib.version "0.15" then "5.1"
|
||||
else "5.0"
|
||||
}:
|
||||
|
||||
let params =
|
||||
if lib.versionAtLeast ppxlib.version "0.32" then {
|
||||
version = "6.0.3";
|
||||
sha256 = "sha256-N0qpezLF4BwJqXgQpIv6IYwhO1tknkRSEBRVrBnJSm0=";
|
||||
} else if lib.versionAtLeast ppxlib.version "0.20" then {
|
||||
version = "5.2.1";
|
||||
sha256 = "11h75dsbv3rs03pl67hdd3lbim7wjzh257ij9c75fcknbfr5ysz9";
|
||||
} else if lib.versionAtLeast ppxlib.version "0.15" then {
|
||||
version = "5.1";
|
||||
sha256 = "1i64fd7qrfzbam5hfbl01r0sx4iihsahcwqj13smmrjlnwi3nkxh";
|
||||
} else {
|
||||
version = "5.0";
|
||||
sha256 = "0fkzrn4pdyvf1kl0nwvhqidq01pnq3ql8zk1jd56hb0cxaw851w3";
|
||||
}
|
||||
; in
|
||||
let hash = {
|
||||
"6.0.3" = "sha256-N0qpezLF4BwJqXgQpIv6IYwhO1tknkRSEBRVrBnJSm0=";
|
||||
"5.2.1" = "sha256:11h75dsbv3rs03pl67hdd3lbim7wjzh257ij9c75fcknbfr5ysz9";
|
||||
"5.1" = "sha256:1i64fd7qrfzbam5hfbl01r0sx4iihsahcwqj13smmrjlnwi3nkxh";
|
||||
"5.0" = "sha256:0fkzrn4pdyvf1kl0nwvhqidq01pnq3ql8zk1jd56hb0cxaw851w3";
|
||||
}."${version}"; in
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "ppx_deriving";
|
||||
inherit (params) version;
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ocaml-ppx/ppx_deriving/releases/download/v${version}/ppx_deriving-${lib.optionalString (lib.versionOlder version "6.0") "v"}${version}.tbz";
|
||||
inherit (params) sha256;
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
Reference in New Issue
Block a user