about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2016-11-12 09:55:42 +0100
committerVincent Laporte <Vincent.Laporte@gmail.com>2016-11-12 12:41:27 +0100
commit72c1a6f0f46cf4e35986b49f957f690922ba7a02 (patch)
treeafd4fadd480e9c7614319ef5eaba2e30ef88b820 /pkgs/development/ocaml-modules
parent24df641deba37fb6f9bed238f028052178721ac6 (diff)
downloadnixlib-72c1a6f0f46cf4e35986b49f957f690922ba7a02.tar
nixlib-72c1a6f0f46cf4e35986b49f957f690922ba7a02.tar.gz
nixlib-72c1a6f0f46cf4e35986b49f957f690922ba7a02.tar.bz2
nixlib-72c1a6f0f46cf4e35986b49f957f690922ba7a02.tar.lz
nixlib-72c1a6f0f46cf4e35986b49f957f690922ba7a02.tar.xz
nixlib-72c1a6f0f46cf4e35986b49f957f690922ba7a02.tar.zst
nixlib-72c1a6f0f46cf4e35986b49f957f690922ba7a02.zip
ocamlPackages.cohttp: refactor
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/cohttp/default.nix17
1 files changed, 9 insertions, 8 deletions
diff --git a/pkgs/development/ocaml-modules/cohttp/default.nix b/pkgs/development/ocaml-modules/cohttp/default.nix
index dcf3c8c13d79..5a22e37d8213 100644
--- a/pkgs/development/ocaml-modules/cohttp/default.nix
+++ b/pkgs/development/ocaml-modules/cohttp/default.nix
@@ -1,22 +1,23 @@
-{stdenv, buildOcaml, fetchurl, cmdliner, re, uri, fieldslib_p4, sexplib_p4, conduit,
- stringext, base64, magic-mime, ounit, alcotest, lwt ? null,
- async ? null, async_ssl ? null}:
+{ stdenv, buildOcaml, fetchurl, ocaml, cmdliner, re, uri, fieldslib_p4
+, sexplib_p4, conduit , stringext, base64, magic-mime, ounit, alcotest
+, asyncSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
+, lwt ? null, async_p4 ? null, async_ssl_p4 ? null
+}:
 
 buildOcaml rec {
   name = "cohttp";
   version = "0.19.3";
 
-  minimumSupportedOcamlVersion = "4.02";
+  minimumSupportedOcamlVersion = "4.01";
 
   src = fetchurl {
     url = "https://github.com/mirage/ocaml-cohttp/archive/v${version}.tar.gz";
     sha256 = "1nrzpd4h52c1hnzcgsz462676saj9zss708ng001h54dglk8i1iv";
   };
 
-  buildInputs = [ alcotest ];
-  propagatedBuildInputs = [ cmdliner re uri fieldslib_p4 sexplib_p4 sexplib_p4
-                            conduit stringext base64 magic-mime ounit async
-                            async_ssl lwt ];
+  buildInputs = [ alcotest cmdliner conduit magic-mime ounit lwt ]
+  ++ stdenv.lib.optionals asyncSupport [ async_p4 async_ssl_p4 ];
+  propagatedBuildInputs = [ re stringext uri fieldslib_p4 sexplib_p4 base64 ];
 
   buildFlags = "PREFIX=$(out)";