coqPackages.serapi: fix build

Use older version of ppx_deriving where relevant and fix to newer
version of findlib.
This commit is contained in:
Vincent Laporte 2024-11-14 21:22:39 +01:00
parent 785e208ce7
commit 8530d4c332
No known key found for this signature in database
GPG Key ID: EBD582ADDDB1F81F
2 changed files with 21 additions and 5 deletions

View File

@ -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 ]; }

View File

@ -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