ocamlPackages.pgocaml: fix for OCaml 5.0

This commit is contained in:
Vincent Laporte 2023-06-02 10:07:13 +02:00 committed by Vincent Laporte
parent 7b77c9ed63
commit 7cd807e588

View File

@ -1,7 +1,9 @@
{ lib, fetchFromGitHub, buildDunePackage { lib, fetchFromGitHub, fetchpatch, buildDunePackage, ocaml
, calendar, csv, hex, ppx_deriving, ppx_sexp_conv, re, rresult, sexplib , calendar, camlp-streams, csv, hex, ppx_deriving, ppx_sexp_conv, re, rresult, sexplib
}: }:
let with-camlp-streams = lib.optional (lib.versionAtLeast ocaml.version "5.0"); in
buildDunePackage rec { buildDunePackage rec {
pname = "pgocaml"; pname = "pgocaml";
version = "4.3.0"; version = "4.3.0";
@ -12,10 +14,16 @@ buildDunePackage rec {
hash = "sha256-W1fbRnU1l61qqxfVY2qiBnVpGD81xrBO8k0tWr+RXMY="; hash = "sha256-W1fbRnU1l61qqxfVY2qiBnVpGD81xrBO8k0tWr+RXMY=";
}; };
minimalOCamlVersion = "4.08"; # Compatibility with OCaml ≥ 5.0
duneVersion = "3"; patches = with-camlp-streams (fetchpatch {
url = "https://github.com/darioteixeira/pgocaml/commit/906a289dc57da4971e312c31eedd26d81e902ed5.patch";
hash = "sha256-/v9Jheg98GhrcD2gcsQpPvq7YiIrvJj22SKvrBRlR9Y=";
});
propagatedBuildInputs = [ calendar csv hex ppx_deriving ppx_sexp_conv re rresult sexplib ]; minimalOCamlVersion = "4.08";
propagatedBuildInputs = [ calendar csv hex ppx_deriving ppx_sexp_conv re rresult sexplib ]
++ with-camlp-streams camlp-streams;
meta = with lib; { meta = with lib; {
description = "An interface to PostgreSQL databases for OCaml applications"; description = "An interface to PostgreSQL databases for OCaml applications";