From 30b1f5652a3b4a43988758b5f77ab7f2f564209c Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 28 Jan 2025 09:11:31 +0100 Subject: [PATCH 1/7] ocamlPackages.gluon: fix build --- pkgs/development/ocaml-modules/gluon/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/ocaml-modules/gluon/default.nix b/pkgs/development/ocaml-modules/gluon/default.nix index 38feb97ba896..9bc4408c28ab 100644 --- a/pkgs/development/ocaml-modules/gluon/default.nix +++ b/pkgs/development/ocaml-modules/gluon/default.nix @@ -2,6 +2,7 @@ lib, buildDunePackage, fetchurl, + fetchpatch, bytestring, config, libc, @@ -20,6 +21,11 @@ buildDunePackage rec { hash = "sha256-YWJCPokY1A7TGqCGoxJl14oKDVeMNybEEB7KiK92WSo="; }; + patches = fetchpatch { + url = "https://github.com/riot-ml/gluon/commit/b29c34d04ea05d7721a229c35132320e796ed4b2.patch"; + hash = "sha256-XuzyoteQAgEs93WrgHTWT1I+hIJAiGiJ4XAiLtnEYtw="; + }; + buildInputs = [ config ]; From 3d769188ec980c2ee78cb2cfa91c62e29a19e846 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 28 Jan 2025 09:11:42 +0100 Subject: [PATCH 2/7] 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 { From 866496759ff239ca55063fa6d76043c14f72d20f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 28 Jan 2025 09:11:38 +0100 Subject: [PATCH 3/7] ocamlPackages.async_ssl: fix for OCaml 5.3 --- pkgs/development/ocaml-modules/janestreet/0.17.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/janestreet/0.17.nix b/pkgs/development/ocaml-modules/janestreet/0.17.nix index 43d600469aeb..a6bba01f125b 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.17.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.17.nix @@ -212,6 +212,10 @@ with self; ctypes-foreign openssl ]; + patches = fetchpatch { + url = "https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/async_ssl/no-incompatible-pointer-types-017.patch"; + hash = "sha256-bpfIi97/b1hIwsFzsmhFAZV1w8CdaMxXoi72ScSYMjY="; + }; }; async_unix = janePackage { From 95dc3c9fadec65722715dbfcb0f16013c2f90ead Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 28 Jan 2025 09:11:45 +0100 Subject: [PATCH 4/7] =?UTF-8?q?ocamlPackages.secp256k1:=20fix=20for=20OCam?= =?UTF-8?q?l=20=E2=89=A5=205.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/secp256k1/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/ocaml-modules/secp256k1/default.nix b/pkgs/development/ocaml-modules/secp256k1/default.nix index 5a97578db5dd..d27d260a3723 100644 --- a/pkgs/development/ocaml-modules/secp256k1/default.nix +++ b/pkgs/development/ocaml-modules/secp256k1/default.nix @@ -1,6 +1,7 @@ { lib, fetchFromGitHub, + fetchpatch, buildDunePackage, base, stdio, @@ -21,6 +22,11 @@ buildDunePackage rec { hash = "sha256-22+dZb3MC1W5Qvsz3+IHV1/XiGCRmJHTH+6IW2QX2hU="; }; + patches = fetchpatch { + url = "https://github.com/dakk/secp256k1-ml/commit/9bde90a401746dcecdab68a2fdb95659d16a3022.patch"; + hash = "sha256-QndtZJtPKPjuv84jDmXc9Q/xGLb/mNUGL4AvRecSFlQ="; + }; + buildInputs = [ base stdio From 366f4c3db10a4194c053eadf2ea99ef8f71f6154 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 28 Jan 2025 09:11:49 +0100 Subject: [PATCH 5/7] =?UTF-8?q?ocamlPackages.ppxlib=5Fjane:=200.17.1=20?= =?UTF-8?q?=E2=86=92=200.17.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/janestreet/0.17.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/janestreet/0.17.nix b/pkgs/development/ocaml-modules/janestreet/0.17.nix index a6bba01f125b..8e43fde337bf 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.17.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.17.nix @@ -1557,8 +1557,8 @@ with self; // ( if lib.versionAtLeast ocaml.version "5.3" then { - version = "0.17.1"; - hash = "sha256-kcGXqO1kFYds8KwLvpIQ7OKhqnp6JZs8WYYLi7o/nBw="; + version = "0.17.2"; + hash = "sha256-AQJSdKtF6p/aG5Lx8VHVEOsisH8ep+iiml6DtW+Hdik="; } else { From a8bd62adaf5f0172cfd2bf804b0134e9a494c8e7 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 28 Jan 2025 09:11:52 +0100 Subject: [PATCH 6/7] ocamlPackages.labltk: add version 8.06.15 for OCaml 5.3 --- pkgs/development/ocaml-modules/labltk/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/ocaml-modules/labltk/default.nix b/pkgs/development/ocaml-modules/labltk/default.nix index b7e00aec4908..2ec6bc0e9d5c 100644 --- a/pkgs/development/ocaml-modules/labltk/default.nix +++ b/pkgs/development/ocaml-modules/labltk/default.nix @@ -78,6 +78,10 @@ let version = "8.06.14"; sha256 = "sha256-eVSQetk+i3KObjHfsvnD615cIsq3aZ7IxycX42cuPIU="; }; + "5.3" = mkNewParam { + version = "8.06.15"; + sha256 = "sha256-I/y5qr5sasCtlrwxL/Lex79rg0o4tzDMBmQY7MdpU2w="; + }; }; param = params.${lib.versions.majorMinor ocaml.version} From 2c22ac2fb68a155c8ce03b0143dad77b98acf09a Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 28 Jan 2025 09:11:56 +0100 Subject: [PATCH 7/7] ocamlPackages.lsp: add version 1.22.0 for OCaml 5.3 --- pkgs/development/ocaml-modules/ocaml-lsp/jsonrpc.nix | 9 ++++++++- pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/ocaml-lsp/jsonrpc.nix b/pkgs/development/ocaml-modules/ocaml-lsp/jsonrpc.nix index aa90b9ac91f3..451b9e7f0d88 100644 --- a/pkgs/development/ocaml-modules/ocaml-lsp/jsonrpc.nix +++ b/pkgs/development/ocaml-modules/ocaml-lsp/jsonrpc.nix @@ -9,7 +9,9 @@ lib, ocaml, version ? - if lib.versionAtLeast ocaml.version "5.2" then + if lib.versionAtLeast ocaml.version "5.3" then + "1.22.0" + else if lib.versionAtLeast ocaml.version "5.2" then "1.21.0" else if lib.versionAtLeast ocaml.version "4.14" then "1.18.0" @@ -24,6 +26,11 @@ let params = { + "1.22.0" = { + name = "lsp"; + minimalOCamlVersion = "5.2"; + sha256 = "sha256-UZ3DV30V3CIQ3vpYBIGnQ1eRGNUGk7aRuxDLyCA/tYE="; + }; "1.21.0" = { name = "lsp"; minimalOCamlVersion = "5.2"; diff --git a/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix b/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix index e05c0494515f..d9c5df1c63f5 100644 --- a/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix +++ b/pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix @@ -23,7 +23,9 @@ ocamlformat-rpc-lib, ocaml, version ? - if lib.versionAtLeast ocaml.version "5.2" then + if lib.versionAtLeast ocaml.version "5.3" then + "1.22.0" + else if lib.versionAtLeast ocaml.version "5.2" then "1.21.0" else if lib.versionAtLeast ocaml.version "4.14" then "1.18.0"