nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

ocamlPackages.pgocaml: fix for OCaml 5.0

authored by

Vincent Laporte and committed by
Vincent Laporte
7cd807e5 7b77c9ed

+13 -5
+13 -5
pkgs/development/ocaml-modules/pgocaml/default.nix
··· 1 - { lib, fetchFromGitHub, buildDunePackage 2 - , calendar, csv, hex, ppx_deriving, ppx_sexp_conv, re, rresult, sexplib 1 + { lib, fetchFromGitHub, fetchpatch, buildDunePackage, ocaml 2 + , calendar, camlp-streams, csv, hex, ppx_deriving, ppx_sexp_conv, re, rresult, sexplib 3 3 }: 4 + 5 + let with-camlp-streams = lib.optional (lib.versionAtLeast ocaml.version "5.0"); in 4 6 5 7 buildDunePackage rec { 6 8 pname = "pgocaml"; ··· 14 12 hash = "sha256-W1fbRnU1l61qqxfVY2qiBnVpGD81xrBO8k0tWr+RXMY="; 15 13 }; 16 14 17 - minimalOCamlVersion = "4.08"; 18 - duneVersion = "3"; 15 + # Compatibility with OCaml ≥ 5.0 16 + patches = with-camlp-streams (fetchpatch { 17 + url = "https://github.com/darioteixeira/pgocaml/commit/906a289dc57da4971e312c31eedd26d81e902ed5.patch"; 18 + hash = "sha256-/v9Jheg98GhrcD2gcsQpPvq7YiIrvJj22SKvrBRlR9Y="; 19 + }); 19 20 20 - propagatedBuildInputs = [ calendar csv hex ppx_deriving ppx_sexp_conv re rresult sexplib ]; 21 + minimalOCamlVersion = "4.08"; 22 + 23 + propagatedBuildInputs = [ calendar csv hex ppx_deriving ppx_sexp_conv re rresult sexplib ] 24 + ++ with-camlp-streams camlp-streams; 21 25 22 26 meta = with lib; { 23 27 description = "An interface to PostgreSQL databases for OCaml applications";