ocamlPackages.pgocaml: 3.2 → 4.0

Ensures compatibility with OCaml 4.08
This commit is contained in:
Vincent Laporte 2019-09-28 18:39:31 +00:00 committed by Vincent Laporte
parent ee06d27cf2
commit 8acf4cd06c

View file

@ -1,34 +1,27 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, camlp4
, ppx_tools_versioned, result, rresult
{ lib, fetchFromGitHub, buildDunePackage
, calendar, csv, hex, re
}:
if !stdenv.lib.versionAtLeast ocaml.version "4.05"
then throw "pgocaml is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-pgocaml-${version}";
version = "3.2";
buildDunePackage rec {
pname = "pgocaml";
version = "4.0";
src = fetchFromGitHub {
owner = "darioteixeira";
repo = "pgocaml";
rev = "v${version}";
sha256 = "0jxzr5niv8kdh90pr57b1qb500zkkasxb8b8l7w9cydcfprnlk24";
sha256 = "1s8c5prr7jb9k76bz990m836czm6k8rv5bvp6s2zg9ra0w19w90j";
};
buildInputs = [ ocaml findlib ocamlbuild camlp4 ppx_tools_versioned result rresult ];
minimumOCamlVersion = "4.05";
preConfigure = "patchShebangs src/genconfig.sh";
propagatedBuildInputs = [ calendar csv hex re ];
configureFlags = [ "--enable-p4" "--enable-ppx" ];
createFindlibDestdir = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "An interface to PostgreSQL databases for OCaml applications";
homepage = http://pgocaml.forge.ocamlcore.org/;
inherit (src.meta) homepage;
license = licenses.lgpl2;
maintainers = with maintainers; [ vbgl ];
inherit (ocaml.meta) platforms;
};
}