about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/batteries/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/llvm/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/lwt/default.nix19
-rw-r--r--pkgs/development/ocaml-modules/mtime/default.nix10
-rw-r--r--pkgs/development/ocaml-modules/nocrypto/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/notty/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/vg/default.nix14
7 files changed, 34 insertions, 19 deletions
diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix
index d24c61745104..b3e657842f88 100644
--- a/pkgs/development/ocaml-modules/batteries/default.nix
+++ b/pkgs/development/ocaml-modules/batteries/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchzip, ocaml, findlib, ocamlbuild, qtest }:
 
-let version = "2.5.3"; in
+let version = "2.6.0"; in
 
 stdenv.mkDerivation {
   name = "ocaml-batteries-${version}";
 
   src = fetchzip {
     url = "https://github.com/ocaml-batteries-team/batteries-included/archive/v${version}.tar.gz";
-    sha256 = "047v05qy0526ad52hzhfa0giczhyzbmw9fwsn6l319icq77ms6jh";
+    sha256 = "1nnypfxm3zkahjkzll5qn4ngpqvbxlwg9qdp8qdqvq2vl76w0672";
   };
 
   buildInputs = [ ocaml findlib ocamlbuild qtest ];
diff --git a/pkgs/development/ocaml-modules/llvm/default.nix b/pkgs/development/ocaml-modules/llvm/default.nix
index 3bced92cc3e3..b06760a6e009 100644
--- a/pkgs/development/ocaml-modules/llvm/default.nix
+++ b/pkgs/development/ocaml-modules/llvm/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
 
   patches = [ (fetchpatch {
     url = https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/llvm/llvm.3.9/files/cmake.patch;
-    sha256 = "1fcc6ylfiw1npdhx7mrsj7h0dx7cym7i9664kpr76zqazb52ikm9";
+    sha256 = "0vjap0xifgm59rwhjc48wi7jpbbif4dllsy4xs45sg95qq5qanp6";
   })];
 
   cmakeFlags = [ "-DLLVM_OCAML_OUT_OF_TREE=TRUE" ];
diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix
index d3a373ab4dbc..53d5a25a39eb 100644
--- a/pkgs/development/ocaml-modules/lwt/default.nix
+++ b/pkgs/development/ocaml-modules/lwt/default.nix
@@ -1,19 +1,30 @@
 { stdenv, fetchzip, which, cryptopp, ocaml, findlib, ocamlbuild, camlp4
 , ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, glib
-, ppx_tools, result
+, ppx_tools, result, cppo
 , ppxSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
 }:
 
+let param =
+  if stdenv.lib.versionAtLeast ocaml.version "4.02"
+  then {
+    version = "2.7.1";
+    sha256 = "0w7f59havrl2fsnvs84lm7wlqpsrldg80gy5afpnpr21zkw22g8w";
+  } else {
+    version = "2.6.0";
+    sha256 = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w";
+  };
+in
+
 stdenv.mkDerivation rec {
   name = "ocaml-lwt-${version}";
-  version = "2.6.0";
+  inherit (param) version;
 
   src = fetchzip {
     url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
-    sha256 = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w";
+    inherit (param) sha256;
   };
 
-  buildInputs = [ ocaml_oasis pkgconfig which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 ]
+  buildInputs = [ ocaml_oasis pkgconfig which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 cppo ]
   ++ stdenv.lib.optional ppxSupport ppx_tools;
 
   propagatedBuildInputs = [ result ocaml_react ocaml_ssl libev ];
diff --git a/pkgs/development/ocaml-modules/mtime/default.nix b/pkgs/development/ocaml-modules/mtime/default.nix
index a26109bd4f95..5e18d1fd6e42 100644
--- a/pkgs/development/ocaml-modules/mtime/default.nix
+++ b/pkgs/development/ocaml-modules/mtime/default.nix
@@ -1,7 +1,9 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, js_of_ocaml
+{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, opam, js_of_ocaml
 , jsooSupport ? !(stdenv.lib.versionAtLeast ocaml.version "4.04")
 }:
 
+with lib;
+
 stdenv.mkDerivation {
   name = "ocaml${ocaml.version}-mtime-0.8.3";
 
@@ -15,7 +17,7 @@ stdenv.mkDerivation {
   buildInputs = [ ocaml findlib ocamlbuild opam ]
   ++ stdenv.lib.optional jsooSupport js_of_ocaml;
 
-  buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true jsoo=${if jsooSupport then "true" else "false"}";
+  buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true jsoo=${boolToString jsooSupport}";
 
   installPhase = "opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR";
 
@@ -23,7 +25,7 @@ stdenv.mkDerivation {
     description = "Monotonic wall-clock time for OCaml";
     homepage = http://erratique.ch/software/mtime;
     inherit (ocaml.meta) platforms;
-    maintainers = [ stdenv.lib.maintainers.vbgl ];
-    license = stdenv.lib.licenses.bsd3;
+    maintainers = [ maintainers.vbgl ];
+    license = licenses.bsd3;
   };
 }
diff --git a/pkgs/development/ocaml-modules/nocrypto/default.nix b/pkgs/development/ocaml-modules/nocrypto/default.nix
index f9240f7507cf..91ab694eb6f2 100644
--- a/pkgs/development/ocaml-modules/nocrypto/default.nix
+++ b/pkgs/development/ocaml-modules/nocrypto/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
 
   buildPhase = ''
     LD_LIBRARY_PATH=${cpuid}/lib/ocaml/${ocaml.version}/site-lib/stubslibs/ \
-    ${topkg.buildPhase} --with-lwt ${if withLwt then "true" else "false"}
+    ${topkg.buildPhase} --with-lwt ${boolToString withLwt}
   '';
   inherit (topkg) installPhase;
 
diff --git a/pkgs/development/ocaml-modules/notty/default.nix b/pkgs/development/ocaml-modules/notty/default.nix
index b967728d048c..950395bd7eaa 100644
--- a/pkgs/development/ocaml-modules/notty/default.nix
+++ b/pkgs/development/ocaml-modules/notty/default.nix
@@ -29,7 +29,7 @@ buildOcaml rec {
                           optional withLwt lwt;
 
   buildPhase = topkg.buildPhase
-  + " --with-lwt ${if withLwt then "true" else "false"}";
+  + " --with-lwt ${boolToString withLwt}";
 
   inherit (topkg) installPhase;
 
diff --git a/pkgs/development/ocaml-modules/vg/default.nix b/pkgs/development/ocaml-modules/vg/default.nix
index cb7878ac731e..ba33081486d7 100644
--- a/pkgs/development/ocaml-modules/vg/default.nix
+++ b/pkgs/development/ocaml-modules/vg/default.nix
@@ -1,16 +1,17 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg
+{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg
 , uchar, result, gg, uutf, otfm, js_of_ocaml,
   pdfBackend ? true, # depends on uutf and otfm
   htmlcBackend ? true # depends on js_of_ocaml
 }:
 
+with lib;
+
 let
   inherit (stdenv.lib) optionals versionAtLeast;
 
   pname = "vg";
   version = "0.9.0";
   webpage = "http://erratique.ch/software/${pname}";
-  sob = b: if b then "true" else "false";
 in
 
 assert versionAtLeast ocaml.version "4.02.0";
@@ -35,13 +36,14 @@ stdenv.mkDerivation rec {
   unpackCmd = "tar xjf $src";
 
   buildPhase = topkg.buildPhase
-  + " --with-uutf ${sob pdfBackend} --with-otfm ${sob pdfBackend}"
-  + " --with-js_of_ocaml ${sob htmlcBackend}"
-  + " --with-cairo2 false";
+    + " --with-uutf ${boolToString pdfBackend}"
+    + " --with-otfm ${boolToString pdfBackend}"
+    + " --with-js_of_ocaml ${boolToString htmlcBackend}"
+    + " --with-cairo2 false";
 
   inherit (topkg) installPhase;
 
-  meta = with stdenv.lib; {
+  meta = {
     description = "Declarative 2D vector graphics for OCaml";
     longDescription = ''
     Vg is an OCaml module for declarative 2D vector graphics. In Vg, images