diff options
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/pgocaml/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/ocaml-modules/pgocaml/default.nix | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/pgocaml/default.nix b/nixpkgs/pkgs/development/ocaml-modules/pgocaml/default.nix index cf3cd3272a8e..8896675f63c8 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/pgocaml/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/pgocaml/default.nix @@ -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 ]; - propagatedBuildInputs = [ calendar csv hex re ]; + minimumOCamlVersion = "4.05"; - configureFlags = [ "--enable-p4" "--enable-ppx" ]; + preConfigure = "patchShebangs src/genconfig.sh"; - createFindlibDestdir = true; + propagatedBuildInputs = [ calendar csv hex re ]; - 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; }; } |