From 540ae8b9356d29b2d268a28a94a637f8f9836872 Mon Sep 17 00:00:00 2001 From: Akhil Indurti Date: Thu, 4 Apr 2024 23:56:08 -0700 Subject: [PATCH 1/3] ocamlPackages.ppxlib: 0.30.0 -> 0.32.0 --- pkgs/development/ocaml-modules/ppxlib/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/ppxlib/default.nix b/pkgs/development/ocaml-modules/ppxlib/default.nix index f2bad712bce7..80d408f1e350 100644 --- a/pkgs/development/ocaml-modules/ppxlib/default.nix +++ b/pkgs/development/ocaml-modules/ppxlib/default.nix @@ -3,7 +3,7 @@ if lib.versionAtLeast ocaml.version "4.07" then if lib.versionAtLeast ocaml.version "4.08" then if lib.versionAtLeast ocaml.version "4.11" - then "0.30.0" else "0.24.0" else "0.15.0" else "0.13.0" + then "0.32.0" else "0.24.0" else "0.15.0" else "0.13.0" , ocaml-compiler-libs, ocaml-migrate-parsetree, ppx_derivers, stdio , stdlib-shims, ocaml-migrate-parsetree-2 }: @@ -64,6 +64,10 @@ let param = { sha256 = "sha256-3UpjvenSm0mBDgTXZTk3yTLxd6lByg4ZgratU6xEIRA="; min_version = "4.07"; }; + "0.32.0" = { + sha256 = "sha256-UHzHPM+JXyLutSV6IkODjBijigkQX8/1Xu75FIVVQis="; + min_version = "4.07"; + }; }."${version}"; in if param ? max_version && lib.versionAtLeast ocaml.version param.max_version From b0d981402e1d38e87ceef75a7410109f54c396ad Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 5 Apr 2024 13:17:32 +0200 Subject: [PATCH 2/3] ocamlPackages.vcaml: fix build with ppxlib > 0.30 --- .../ocaml-modules/janestreet/0.16.nix | 1 + .../ocaml-modules/janestreet/vcaml.patch | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/development/ocaml-modules/janestreet/vcaml.patch diff --git a/pkgs/development/ocaml-modules/janestreet/0.16.nix b/pkgs/development/ocaml-modules/janestreet/0.16.nix index 562364df53bc..35d2895f679f 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.16.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.16.nix @@ -1221,6 +1221,7 @@ with self; hash = "sha256-pmEKi24+22T76SzI3RpBmQF7ZrQwlngrpFYLoBdLwe0="; meta.description = "OCaml bindings for the Neovim API"; propagatedBuildInputs = [ angstrom-async async_extra expect_test_helpers_async faraday jsonaf man_in_the_middle_debugger semantic_version ]; + patches = [ ./vcaml.patch ]; }; virtual_dom = janePackage { diff --git a/pkgs/development/ocaml-modules/janestreet/vcaml.patch b/pkgs/development/ocaml-modules/janestreet/vcaml.patch new file mode 100644 index 000000000000..5d0fbbec4d33 --- /dev/null +++ b/pkgs/development/ocaml-modules/janestreet/vcaml.patch @@ -0,0 +1,22 @@ +diff --git a/src/api_call.ml b/src/api_call.ml +index 66f5083..6e96e95 100644 +--- a/src/api_call.ml ++++ b/src/api_call.ml +@@ -112,7 +112,7 @@ include + include T + end) + (Open_on_rhs_intf) +- () ++ (struct end) + + module Or_error = struct + type nonrec 'a t = 'a Or_error.t t +@@ -138,7 +138,7 @@ module Or_error = struct + include T + end) + (Open_on_rhs_intf) +- () ++ (struct end) + + let error_s sexp = Const (Or_error.error_s sexp) + let ignore_m t = map t ~f:ignore From d52a9683d1384e07d7e27d8d4463c01673b81d40 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 5 Apr 2024 14:27:16 +0200 Subject: [PATCH 3/3] ocamlPackages.ppx_cstubs: fix build with ppxlib > 0.30 --- .../ocaml-modules/ppx_cstubs/default.nix | 4 ++-- .../ocaml-modules/ppx_cstubs/ppxlib.patch | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/ocaml-modules/ppx_cstubs/ppxlib.patch diff --git a/pkgs/development/ocaml-modules/ppx_cstubs/default.nix b/pkgs/development/ocaml-modules/ppx_cstubs/default.nix index 1b5e96a2d8de..7cf1a0d869e3 100644 --- a/pkgs/development/ocaml-modules/ppx_cstubs/default.nix +++ b/pkgs/development/ocaml-modules/ppx_cstubs/default.nix @@ -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 = [ diff --git a/pkgs/development/ocaml-modules/ppx_cstubs/ppxlib.patch b/pkgs/development/ocaml-modules/ppx_cstubs/ppxlib.patch new file mode 100644 index 000000000000..14cc08991e70 --- /dev/null +++ b/pkgs/development/ocaml-modules/ppx_cstubs/ppxlib.patch @@ -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)