From 3d769188ec980c2ee78cb2cfa91c62e29a19e846 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 28 Jan 2025 09:11:42 +0100 Subject: [PATCH] ocamlPackages.core_unix: fix for OCaml 5.3 --- pkgs/development/ocaml-modules/janestreet/0.17.nix | 8 ++++++++ pkgs/top-level/ocaml-packages.nix | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/janestreet/0.17.nix b/pkgs/development/ocaml-modules/janestreet/0.17.nix index 404dfd614fbd..43d600469aeb 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.17.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.17.nix @@ -1,6 +1,7 @@ { self, bash, + fetchpatch, fzf, lib, openssl, @@ -498,6 +499,13 @@ with self; patchShebangs unix_pseudo_terminal/src/discover.sh ''; doCheck = false; # command_validate_parsing.exe is not specified in test build deps + + # Compatibility with OCaml 5.3 + patches = lib.optional (lib.versionAtLeast ocaml.version "5.3") (fetchpatch { + url = "https://github.com/janestreet/core_unix/commit/ebce389ac68e098f542e34400e114ac992f415af.patch"; + includes = [ "bigstring_unix/src/bigstring_unix_stubs.c" ]; + hash = "sha256-FGg2zlyp3aZFu1VeFdm7pgSPiW0HAkLYgMGTj+tqju8="; + }); }; csvfields = janePackage { diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index d8649636dbb2..9bcc8ab5b821 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -793,7 +793,7 @@ let then import ../development/ocaml-modules/janestreet/0.17.nix { inherit self; - inherit (pkgs) bash fzf lib openssl zstd; + inherit (pkgs) bash fetchpatch fzf lib openssl zstd; } else if lib.versionOlder "4.13.1" ocaml.version then import ../development/ocaml-modules/janestreet/0.16.nix {