ocamlPackages.ppx_cstubs: fix build with ppxlib > 0.30

This commit is contained in:
Vincent Laporte 2024-04-05 14:27:16 +02:00
parent b0d981402e
commit d52a9683d1
No known key found for this signature in database
GPG Key ID: EBD582ADDDB1F81F
2 changed files with 24 additions and 2 deletions

View File

@ -18,8 +18,6 @@ buildDunePackage rec {
minimalOCamlVersion = "4.08";
duneVersion = "3";
src = fetchFromGitHub {
owner = "fdopen";
repo = "ppx_cstubs";
@ -27,6 +25,8 @@ buildDunePackage rec {
hash = "sha256-qMmwRWCIfNyhCQYPKLiufnb57sTR3P+WInOqtPDywFs=";
};
patches = [ ./ppxlib.patch ];
nativeBuildInputs = [ cppo ];
buildInputs = [

View File

@ -0,0 +1,22 @@
diff --git a/src/internal/ppxc__script_real.ml b/src/internal/ppxc__script_real.ml
index 392f2a5..d950fc9 100644
--- a/src/internal/ppxc__script_real.ml
+++ b/src/internal/ppxc__script_real.ml
@@ -168,7 +168,7 @@ module C_content_make (E : Empty) = struct
if cnt = 0 then None else Some (String.concat "\n\n" l)
end
-module C_content_phase0 = C_content_make ()
+module C_content_phase0 = C_content_make (struct end)
module type Const_common_s = sig
include module type of C_content_phase0
@@ -300,7 +300,7 @@ module Const_phase0 = struct
else C_content_phase0.add_extract_source s2 loc exn f
end
-module C_content = C_content_make ()
+module C_content = C_content_make (struct end)
module Const = struct
include Const_common (C_content)