Skip to content

Commit

Permalink
update ocaml 5.3 to get string literal fix (#1782)
Browse files Browse the repository at this point in the history
* update ocaml 5.3 to get string literal fix

* fix / upgrade a few 5.3 packages

* fix extlib
  • Loading branch information
anmonteiro authored Nov 24, 2024
1 parent 19bcfe6 commit 9ea5b87
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 7 deletions.
50 changes: 45 additions & 5 deletions ocaml/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,15 @@ with oself;
};
};

batteries = osuper.batteries.overrideAttrs (_: {
src = fetchFromGitHub {
owner = "ocaml-batteries-team";
repo = "batteries-included";
rev = "1a4e920ff4e639394ca2d7b84160c08679e4f654";
hash = "sha256-1A5Ys28y46TcL6H8AoEGTTBtj7MeTMuGpZYcCGGII/s=";
};
});

bechamel = buildDunePackage {
pname = "bechamel";
version = "0.5.0";
Expand Down Expand Up @@ -865,17 +874,24 @@ with oself;
'';
});

eio = osuper.eio.overrideAttrs (_: {
src = builtins.fetchurl {
url = "https://github.com/ocaml-multicore/eio/releases/download/v1.2/eio-1.2.tbz";
sha256 = "0h5wssgslv4nnbqw3whcjyqi5lp44lc0hwwgwfr4njcdpl9fk4ip";
};
});

eio-ssl =
if lib.versionAtLeast ocaml.version "5.0" then
callPackage ./eio-ssl { }
else null;

extlib = osuper.extlib.overrideAttrs (_: {
extlib-1-7-9 = osuper.extlib-1-7-9.overrideAttrs (_: {
src = fetchFromGitHub {
owner = "ygrek";
repo = "ocaml-extlib";
rev = "1.8.0";
hash = "sha256-5GvktCAwYSu9SGU06gR51iVf6i5anIYyP+o4pGoF0Dw=";
rev = "99333426030c6d5a1d782a4193dbb9230e8455ee";
hash = "sha256-5DcvGuCtGjMILGozlYRvpUSNh6+P6r/j4R8aVUtVlFU=";
};
});

Expand Down Expand Up @@ -1136,6 +1152,14 @@ with oself;
];
};
irmin-git = disableTests osuper.irmin-git;
ppx_irmin = osuper.ppx_irmin.overrideAttrs (_: {
src = fetchFromGitHub {
owner = "mirage";
repo = "irmin";
rev = "aa524cbcdb94a78f62e4e943b7ec348edf5df167";
hash = "sha256-xCaq/GqSveX0NfmR0kfp1JvzPmK/gMQIgG4Vv1YwV6U=";
};
});

iostream = buildDunePackage {
pname = "iostream";
Expand Down Expand Up @@ -1385,6 +1409,13 @@ with oself;
matrix-stos = callPackage ./matrix/stos.nix { };

mdx = (osuper.mdx.override { inherit logs; }).overrideAttrs (o: {
src = fetchFromGitHub {
owner = "realworldocaml";
repo = "mdx";
rev = "c3b0e077627cf1dd88c01271177c2fb7271a450e";
hash = "sha256-y2K9Lj0ro9keFrcBUFck2CtHGXtePJlgjCAJsRj5Hs8=";
};
doCheck = ! lib.versionOlder "5.3" ocaml.version;
# Break the attempt to reduce `mdx`'s closure size by adding a different
# `logs` override, which breaks anything that uses logs (with OCaml package
# conflicts)
Expand Down Expand Up @@ -1799,6 +1830,15 @@ with oself;
};
});

ocaml-version = osuper.ocaml-version.overrideAttrs (_: {
src = fetchFromGitHub {
owner = "ocurrent";
repo = "ocaml-version";
rev = "v3.7.1";
hash = "sha256-m7yXdhwNIJBch7+urYxdfOB5EWdSZVAtoggzr4Ag8k0=";
};
});

ocp-indent = osuper.ocp-indent.overrideAttrs (o: {
postPatch = ''
substituteInPlace src/dune --replace-fail "libraries bytes" "libraries "
Expand Down Expand Up @@ -1962,8 +2002,8 @@ with oself;
src = fetchFromGitHub {
owner = "ocaml";
repo = "opam";
rev = "2.3.0-rc1";
hash = "sha256-HAr7LOuq9mOfgHGTm+WPJDL7Q1ih9YGSZOs5BWynTpk=";
rev = "2.3.0";
hash = "sha256-ZU11fWiS4hdbbzYytudTK8M1O6r51HRZ+ASO+VxvekE=";
};
version = "2.3.0-alpha1";
meta = with lib; {
Expand Down
4 changes: 2 additions & 2 deletions ocaml/overlay-ocaml-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ let
src = super.fetchFromGitHub {
owner = "ocaml";
repo = "ocaml";
rev = "5.3.0-beta1";
hash = "sha256-l+5q+6oroTcwnyOFNIU+E39/dPQYgjgSI+sbipWVYRI=";
rev = "66b424d9ad97aa9567099428c9d99721350bd7dd";
hash = "sha256-AXx5hQhgeWD8d50hwelPUj23kPRnpx7FwfOuJNoUELY=";
};
};

Expand Down

0 comments on commit 9ea5b87

Please sign in to comment.