summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/stringext
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2015-07-01 20:19:50 +0200
committerVincent Laporte <Vincent.Laporte@gmail.com>2015-07-01 20:23:19 +0200
commit9a97c3c7aed398d1d86f93a817f3cdf7ea1a3d85 (patch)
tree12130bcda3ed215303ca079158706b5f30ff7e1e /pkgs/development/ocaml-modules/stringext
parentdab57252b1b47c70dc209a8b1fa4fbafc04b323a (diff)
downloadnixlib-9a97c3c7aed398d1d86f93a817f3cdf7ea1a3d85.tar
nixlib-9a97c3c7aed398d1d86f93a817f3cdf7ea1a3d85.tar.gz
nixlib-9a97c3c7aed398d1d86f93a817f3cdf7ea1a3d85.tar.bz2
nixlib-9a97c3c7aed398d1d86f93a817f3cdf7ea1a3d85.tar.lz
nixlib-9a97c3c7aed398d1d86f93a817f3cdf7ea1a3d85.tar.xz
nixlib-9a97c3c7aed398d1d86f93a817f3cdf7ea1a3d85.tar.zst
nixlib-9a97c3c7aed398d1d86f93a817f3cdf7ea1a3d85.zip
ocaml-stringext: 1.3.0 -> 1.4.0
Diffstat (limited to 'pkgs/development/ocaml-modules/stringext')
-rw-r--r--pkgs/development/ocaml-modules/stringext/default.nix16
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/development/ocaml-modules/stringext/default.nix b/pkgs/development/ocaml-modules/stringext/default.nix
index dae947035d25..961ee4b1fcd5 100644
--- a/pkgs/development/ocaml-modules/stringext/default.nix
+++ b/pkgs/development/ocaml-modules/stringext/default.nix
@@ -1,19 +1,25 @@
-{ stdenv, fetchzip, ocaml, findlib }:
+{ stdenv, fetchzip, ocaml, findlib, ounit, qcheck
+# Optionally enable tests; test script use OCaml-4.01+ features
+, doCheck ? stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01"
+}:
 
-let version = "1.3.0"; in
+let version = "1.4.0"; in
 
 stdenv.mkDerivation {
   name = "ocaml-stringext-${version}";
 
   src = fetchzip {
     url = "https://github.com/rgrinberg/stringext/archive/v${version}.tar.gz";
-    sha256 = "0sd1chyxclmip0nxqhasp1ri91bwxr8nszkkr5kpja45f6bav6k9";
+    sha256 = "1jp0x9rkss8a48z9wbnc4v5zvmnysin30345psl3xnxb2aqzwlii";
   };
 
-  buildInputs = [ ocaml findlib ];
+  buildInputs = [ ocaml findlib ounit qcheck ];
 
-  configurePhase = "ocaml setup.ml -configure --prefix $out";
+  configurePhase = "ocaml setup.ml -configure --prefix $out"
+  + stdenv.lib.optionalString doCheck " --enable-tests";
   buildPhase = "ocaml setup.ml -build";
+  inherit doCheck;
+  checkPhase = "ocaml setup.ml -test";
   installPhase = "ocaml setup.ml -install";
 
   createFindlibDestdir = true;