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 { lib, fetchFromGitHub, buildDunePackage
, ppx_tools_versioned, result, rresult
, calendar, csv, hex, re , calendar, csv, hex, re
}: }:
if !stdenv.lib.versionAtLeast ocaml.version "4.05" buildDunePackage rec {
then throw "pgocaml is not available for OCaml ${ocaml.version}" pname = "pgocaml";
else version = "4.0";
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-pgocaml-${version}";
version = "3.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "darioteixeira"; owner = "darioteixeira";
repo = "pgocaml"; repo = "pgocaml";
rev = "v${version}"; 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 ]; propagatedBuildInputs = [ calendar csv hex re ];
configureFlags = [ "--enable-p4" "--enable-ppx" ]; meta = with lib; {
createFindlibDestdir = true;
meta = with stdenv.lib; {
description = "An interface to PostgreSQL databases for OCaml applications"; description = "An interface to PostgreSQL databases for OCaml applications";
homepage = http://pgocaml.forge.ocamlcore.org/; inherit (src.meta) homepage;
license = licenses.lgpl2; license = licenses.lgpl2;
maintainers = with maintainers; [ vbgl ]; maintainers = with maintainers; [ vbgl ];
inherit (ocaml.meta) platforms;
}; };
} }