about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2019-09-28 18:39:31 +0000
committerVincent Laporte <vbgl@users.noreply.github.com>2019-10-06 07:57:37 +0200
commit8acf4cd06cd5ac5f6a57e115af6e5a484d979f89 (patch)
treeafb84bc5bdb240e3fd1691002df135460844d540 /pkgs/development/ocaml-modules
parentee06d27cf23aa59fec01d47e3cfea12ae3c9f7c7 (diff)
downloadnixlib-8acf4cd06cd5ac5f6a57e115af6e5a484d979f89.tar
nixlib-8acf4cd06cd5ac5f6a57e115af6e5a484d979f89.tar.gz
nixlib-8acf4cd06cd5ac5f6a57e115af6e5a484d979f89.tar.bz2
nixlib-8acf4cd06cd5ac5f6a57e115af6e5a484d979f89.tar.lz
nixlib-8acf4cd06cd5ac5f6a57e115af6e5a484d979f89.tar.xz
nixlib-8acf4cd06cd5ac5f6a57e115af6e5a484d979f89.tar.zst
nixlib-8acf4cd06cd5ac5f6a57e115af6e5a484d979f89.zip
ocamlPackages.pgocaml: 3.2 → 4.0
Ensures compatibility with OCaml 4.08
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/pgocaml/default.nix27
1 files changed, 10 insertions, 17 deletions
diff --git a/pkgs/development/ocaml-modules/pgocaml/default.nix b/pkgs/development/ocaml-modules/pgocaml/default.nix
index cf3cd3272a8e..8896675f63c8 100644
--- a/pkgs/development/ocaml-modules/pgocaml/default.nix
+++ b/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;
   };
 }