Skip to content

Commit 006a5f3

Browse files
authored
ocamlPackages: a few fixes for OCaml 5.3 (NixOS#377543)
2 parents 036f54e + 2c22ac2 commit 006a5f3

File tree

7 files changed

+42
-5
lines changed

7 files changed

+42
-5
lines changed

pkgs/development/ocaml-modules/gluon/default.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
lib,
33
buildDunePackage,
44
fetchurl,
5+
fetchpatch,
56
bytestring,
67
config,
78
libc,
@@ -20,6 +21,11 @@ buildDunePackage rec {
2021
hash = "sha256-YWJCPokY1A7TGqCGoxJl14oKDVeMNybEEB7KiK92WSo=";
2122
};
2223

24+
patches = fetchpatch {
25+
url = "https://github.com/riot-ml/gluon/commit/b29c34d04ea05d7721a229c35132320e796ed4b2.patch";
26+
hash = "sha256-XuzyoteQAgEs93WrgHTWT1I+hIJAiGiJ4XAiLtnEYtw=";
27+
};
28+
2329
buildInputs = [
2430
config
2531
];

pkgs/development/ocaml-modules/janestreet/0.17.nix

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
self,
33
bash,
4+
fetchpatch,
45
fzf,
56
lib,
67
openssl,
@@ -211,6 +212,10 @@ with self;
211212
ctypes-foreign
212213
openssl
213214
];
215+
patches = fetchpatch {
216+
url = "https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/async_ssl/no-incompatible-pointer-types-017.patch";
217+
hash = "sha256-bpfIi97/b1hIwsFzsmhFAZV1w8CdaMxXoi72ScSYMjY=";
218+
};
214219
};
215220

216221
async_unix = janePackage {
@@ -498,6 +503,13 @@ with self;
498503
patchShebangs unix_pseudo_terminal/src/discover.sh
499504
'';
500505
doCheck = false; # command_validate_parsing.exe is not specified in test build deps
506+
507+
# Compatibility with OCaml 5.3
508+
patches = lib.optional (lib.versionAtLeast ocaml.version "5.3") (fetchpatch {
509+
url = "https://github.com/janestreet/core_unix/commit/ebce389ac68e098f542e34400e114ac992f415af.patch";
510+
includes = [ "bigstring_unix/src/bigstring_unix_stubs.c" ];
511+
hash = "sha256-FGg2zlyp3aZFu1VeFdm7pgSPiW0HAkLYgMGTj+tqju8=";
512+
});
501513
};
502514

503515
csvfields = janePackage {
@@ -1545,8 +1557,8 @@ with self;
15451557
// (
15461558
if lib.versionAtLeast ocaml.version "5.3" then
15471559
{
1548-
version = "0.17.1";
1549-
hash = "sha256-kcGXqO1kFYds8KwLvpIQ7OKhqnp6JZs8WYYLi7o/nBw=";
1560+
version = "0.17.2";
1561+
hash = "sha256-AQJSdKtF6p/aG5Lx8VHVEOsisH8ep+iiml6DtW+Hdik=";
15501562
}
15511563
else
15521564
{

pkgs/development/ocaml-modules/labltk/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ let
7878
version = "8.06.14";
7979
sha256 = "sha256-eVSQetk+i3KObjHfsvnD615cIsq3aZ7IxycX42cuPIU=";
8080
};
81+
"5.3" = mkNewParam {
82+
version = "8.06.15";
83+
sha256 = "sha256-I/y5qr5sasCtlrwxL/Lex79rg0o4tzDMBmQY7MdpU2w=";
84+
};
8185
};
8286
param =
8387
params.${lib.versions.majorMinor ocaml.version}

pkgs/development/ocaml-modules/ocaml-lsp/jsonrpc.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
lib,
1010
ocaml,
1111
version ?
12-
if lib.versionAtLeast ocaml.version "5.2" then
12+
if lib.versionAtLeast ocaml.version "5.3" then
13+
"1.22.0"
14+
else if lib.versionAtLeast ocaml.version "5.2" then
1315
"1.21.0"
1416
else if lib.versionAtLeast ocaml.version "4.14" then
1517
"1.18.0"
@@ -24,6 +26,11 @@
2426
let
2527
params =
2628
{
29+
"1.22.0" = {
30+
name = "lsp";
31+
minimalOCamlVersion = "5.2";
32+
sha256 = "sha256-UZ3DV30V3CIQ3vpYBIGnQ1eRGNUGk7aRuxDLyCA/tYE=";
33+
};
2734
"1.21.0" = {
2835
name = "lsp";
2936
minimalOCamlVersion = "5.2";

pkgs/development/ocaml-modules/ocaml-lsp/lsp.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
ocamlformat-rpc-lib,
2424
ocaml,
2525
version ?
26-
if lib.versionAtLeast ocaml.version "5.2" then
26+
if lib.versionAtLeast ocaml.version "5.3" then
27+
"1.22.0"
28+
else if lib.versionAtLeast ocaml.version "5.2" then
2729
"1.21.0"
2830
else if lib.versionAtLeast ocaml.version "4.14" then
2931
"1.18.0"

pkgs/development/ocaml-modules/secp256k1/default.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
lib,
33
fetchFromGitHub,
4+
fetchpatch,
45
buildDunePackage,
56
base,
67
stdio,
@@ -21,6 +22,11 @@ buildDunePackage rec {
2122
hash = "sha256-22+dZb3MC1W5Qvsz3+IHV1/XiGCRmJHTH+6IW2QX2hU=";
2223
};
2324

25+
patches = fetchpatch {
26+
url = "https://github.com/dakk/secp256k1-ml/commit/9bde90a401746dcecdab68a2fdb95659d16a3022.patch";
27+
hash = "sha256-QndtZJtPKPjuv84jDmXc9Q/xGLb/mNUGL4AvRecSFlQ=";
28+
};
29+
2430
buildInputs = [
2531
base
2632
stdio

pkgs/top-level/ocaml-packages.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ let
793793
then import ../development/ocaml-modules/janestreet/0.17.nix
794794
{
795795
inherit self;
796-
inherit (pkgs) bash fzf lib openssl zstd;
796+
inherit (pkgs) bash fetchpatch fzf lib openssl zstd;
797797
}
798798
else if lib.versionOlder "4.13.1" ocaml.version
799799
then import ../development/ocaml-modules/janestreet/0.16.nix {

0 commit comments

Comments
 (0)