about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/re
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2018-06-24 09:20:13 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2018-06-24 19:23:12 +0000
commitea7c74c7729c037f2eaab4da99f3d55b8bacc92b (patch)
tree449c4cb04567bad0575b593c98300b8c4eb2617a /pkgs/development/ocaml-modules/re
parentc51ac5eb335c632ec6a762f212bb3f5db0e55d05 (diff)
ocamlPackages.re: 1.7.1 -> 1.7.3
Diffstat (limited to 'pkgs/development/ocaml-modules/re')
-rw-r--r--pkgs/development/ocaml-modules/re/default.nix24
1 files changed, 12 insertions, 12 deletions
diff --git a/pkgs/development/ocaml-modules/re/default.nix b/pkgs/development/ocaml-modules/re/default.nix
index 861ac8b3bc81d..c6f1b6d175815 100644
--- a/pkgs/development/ocaml-modules/re/default.nix
+++ b/pkgs/development/ocaml-modules/re/default.nix
@@ -1,24 +1,24 @@
-{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, ounit }:
+{ stdenv, fetchzip, ocaml, findlib, jbuilder, ounit }:
+
+if !stdenv.lib.versionAtLeast ocaml.version "4.02"
+then throw "re is not available for OCaml ${ocaml.version}"
+else
 
 stdenv.mkDerivation rec {
-  name = "ocaml-re-${version}";
-  version = "1.7.1";
+  name = "ocaml${ocaml.version}-re-${version}";
+  version = "1.7.3";
 
   src = fetchzip {
     url = "https://github.com/ocaml/ocaml-re/archive/${version}.tar.gz";
-    sha256 = "1z2z4fjrpdbl0q50fdxvy3746w1vx6ybxcb0k81hqm1342nylbmw";
+    sha256 = "1pb6w9wqg6gzcfaaw6ckv1bqjgjpmrzzqz7r0mp9w16qbf3i54zr";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild ounit ];
+  buildInputs = [ ocaml findlib jbuilder ounit ];
 
-  configurePhase = "ocaml setup.ml -configure --prefix $out"
-  + stdenv.lib.optionalString doCheck " --enable-tests";
-  buildPhase = "ocaml setup.ml -build";
-  doCheck = !stdenv.lib.versionAtLeast ocaml.version "4.06";
-  checkPhase = "ocaml setup.ml -test";
-  installPhase = "ocaml setup.ml -install";
+  doCheck = true;
+  checkPhase = "jbuilder runtest";
 
-  createFindlibDestdir = true;
+  inherit (jbuilder) installPhase;
 
   meta = {
     homepage = https://github.com/ocaml/ocaml-re;