Unverified Commit 006a5f3e authored by Ulrik Strid's avatar Ulrik Strid Committed by GitHub
Browse files

ocamlPackages: a few fixes for OCaml 5.3 (#377543)

parents 036f54e7 2c22ac2f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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
  ];
+14 −2
Original line number Diff line number Diff line
{
  self,
  bash,
  fetchpatch,
  fzf,
  lib,
  openssl,
@@ -211,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 {
@@ -498,6 +503,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 {
@@ -1545,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
        {
+4 −0
Original line number Diff line number Diff line
@@ -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}
+8 −1
Original line number Diff line number Diff line
@@ -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";
+3 −1
Original line number Diff line number Diff line
@@ -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"
Loading