3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/pgocaml/default.nix

35 lines
1 KiB
Nix
Raw Normal View History

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