Merge pull request #237304 from vbgl/ocaml-mariadb-fix-for-ocaml-5

ocamlPackages: fixes for OCaml ≥ 5.0

authored by Ulrik Strid and committed by GitHub f5f4bba4 2dd9125a

+18 -2
+4
pkgs/development/ocaml-modules/ansiterminal/default.nix
··· 9 9 hash = "sha256-q3OyGLajAmfSu8QzEtzzE5gbiwvsVV2SsGuHZkst0w4="; 10 10 }; 11 11 12 + postPatch = '' 13 + substituteInPlace src/dune --replace 'libraries unix bytes' 'libraries unix' 14 + ''; 15 + 12 16 doCheck = true; 13 17 14 18 meta = with lib; {
+1
pkgs/development/ocaml-modules/bz2/default.nix
··· 1 1 { lib, stdenv, fetchFromGitLab, ocaml, findlib, bzip2, autoreconfHook }: 2 2 3 3 if lib.versionOlder ocaml.version "4.02" 4 + || lib.versionAtLeast ocaml.version "5.0" 4 5 then throw "bz2 is not available for OCaml ${ocaml.version}" 5 6 else 6 7
+13 -2
pkgs/development/ocaml-modules/mariadb/default.nix
··· 1 1 { lib, fetchurl, stdenv 2 - , ocaml, findlib, ocamlbuild 2 + , fetchpatch 3 + , ocaml, findlib, ocamlbuild, camlp-streams 3 4 , ctypes, mariadb, libmysqlclient }: 4 5 5 6 lib.throwIfNot (lib.versionAtLeast ocaml.version "4.07") ··· 14 15 sha256 = "sha256-3/C1Gz6luUzS7oaudLlDHMT6JB2v5OdbLVzJhtayHGM="; 15 16 }; 16 17 18 + patches = fetchpatch { 19 + url = "https://github.com/andrenth/ocaml-mariadb/commit/9db2e4d8dec7c584213d0e0f03d079a36a35d9d5.patch"; 20 + hash = "sha256-heROtU02cYBJ5edIHMdYP1xNXcLv8h79GYGBuudJhgE="; 21 + }; 22 + 23 + postPatch = '' 24 + substituteInPlace setup.ml --replace '#use "topfind"' \ 25 + '#directory "${findlib}/lib/ocaml/${ocaml.version}/site-lib/";; #use "topfind"' 26 + ''; 27 + 17 28 nativeBuildInputs = [ ocaml findlib ocamlbuild ]; 18 - buildInputs = [ mariadb libmysqlclient ]; 29 + buildInputs = [ mariadb libmysqlclient camlp-streams ocamlbuild ]; 19 30 propagatedBuildInputs = [ ctypes ]; 20 31 21 32 strictDeps = true;