diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2023-06-02 10:07:13 +0200 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2023-06-08 13:45:04 +0200 |
commit | 7cd807e5883736e1eeddb091b5774ee95af29869 (patch) | |
tree | 05c5dceb4e9198fb6dcc744642ca0375a2e54f11 /pkgs/development/ocaml-modules | |
parent | 7b77c9ed6375fa070e5db921442098ed45d8ae3d (diff) | |
download | nixlib-7cd807e5883736e1eeddb091b5774ee95af29869.tar nixlib-7cd807e5883736e1eeddb091b5774ee95af29869.tar.gz nixlib-7cd807e5883736e1eeddb091b5774ee95af29869.tar.bz2 nixlib-7cd807e5883736e1eeddb091b5774ee95af29869.tar.lz nixlib-7cd807e5883736e1eeddb091b5774ee95af29869.tar.xz nixlib-7cd807e5883736e1eeddb091b5774ee95af29869.tar.zst nixlib-7cd807e5883736e1eeddb091b5774ee95af29869.zip |
ocamlPackages.pgocaml: fix for OCaml 5.0
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r-- | pkgs/development/ocaml-modules/pgocaml/default.nix | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/development/ocaml-modules/pgocaml/default.nix b/pkgs/development/ocaml-modules/pgocaml/default.nix index 22ef94af92e1..76b97103d667 100644 --- a/pkgs/development/ocaml-modules/pgocaml/default.nix +++ b/pkgs/development/ocaml-modules/pgocaml/default.nix @@ -1,7 +1,9 @@ -{ lib, fetchFromGitHub, buildDunePackage -, calendar, csv, hex, ppx_deriving, ppx_sexp_conv, re, rresult, sexplib +{ lib, fetchFromGitHub, fetchpatch, buildDunePackage, ocaml +, 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 { pname = "pgocaml"; version = "4.3.0"; @@ -12,10 +14,16 @@ buildDunePackage rec { hash = "sha256-W1fbRnU1l61qqxfVY2qiBnVpGD81xrBO8k0tWr+RXMY="; }; + # Compatibility with OCaml ≥ 5.0 + patches = with-camlp-streams (fetchpatch { + url = "https://github.com/darioteixeira/pgocaml/commit/906a289dc57da4971e312c31eedd26d81e902ed5.patch"; + hash = "sha256-/v9Jheg98GhrcD2gcsQpPvq7YiIrvJj22SKvrBRlR9Y="; + }); + minimalOCamlVersion = "4.08"; - duneVersion = "3"; - propagatedBuildInputs = [ calendar csv hex ppx_deriving ppx_sexp_conv re rresult sexplib ]; + propagatedBuildInputs = [ calendar csv hex ppx_deriving ppx_sexp_conv re rresult sexplib ] + ++ with-camlp-streams camlp-streams; meta = with lib; { description = "An interface to PostgreSQL databases for OCaml applications"; |