diff options
| author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2023-06-02 10:07:13 +0200 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2023-06-08 11:45:44 +0000 |
| commit | 52bfd5203b0b73d684d24045f3b80a78f6df1941 (patch) | |
| tree | 1cdc62650c5d9f9f8614ca85663a4297bc1c0786 | |
| parent | ocamlPackages.wasm: disable for OCaml ≥ 5.0 (diff) | |
| download | nixpkgs-52bfd5203b0b73d684d24045f3b80a78f6df1941.tar.gz | |
ocamlPackages.pgocaml: fix for OCaml 5.0
(cherry picked from commit 004686b71d7b8e07c3d469b6beb47e8a7d024a1a)
| -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"; |
