ocamlPackages.cohttp: refactor
This commit is contained in:
parent
24df641deb
commit
72c1a6f0f4
@ -1,22 +1,23 @@
|
|||||||
{stdenv, buildOcaml, fetchurl, cmdliner, re, uri, fieldslib_p4, sexplib_p4, conduit,
|
{ stdenv, buildOcaml, fetchurl, ocaml, cmdliner, re, uri, fieldslib_p4
|
||||||
stringext, base64, magic-mime, ounit, alcotest, lwt ? null,
|
, sexplib_p4, conduit , stringext, base64, magic-mime, ounit, alcotest
|
||||||
async ? null, async_ssl ? null}:
|
, asyncSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
|
||||||
|
, lwt ? null, async_p4 ? null, async_ssl_p4 ? null
|
||||||
|
}:
|
||||||
|
|
||||||
buildOcaml rec {
|
buildOcaml rec {
|
||||||
name = "cohttp";
|
name = "cohttp";
|
||||||
version = "0.19.3";
|
version = "0.19.3";
|
||||||
|
|
||||||
minimumSupportedOcamlVersion = "4.02";
|
minimumSupportedOcamlVersion = "4.01";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/mirage/ocaml-cohttp/archive/v${version}.tar.gz";
|
url = "https://github.com/mirage/ocaml-cohttp/archive/v${version}.tar.gz";
|
||||||
sha256 = "1nrzpd4h52c1hnzcgsz462676saj9zss708ng001h54dglk8i1iv";
|
sha256 = "1nrzpd4h52c1hnzcgsz462676saj9zss708ng001h54dglk8i1iv";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ alcotest ];
|
buildInputs = [ alcotest cmdliner conduit magic-mime ounit lwt ]
|
||||||
propagatedBuildInputs = [ cmdliner re uri fieldslib_p4 sexplib_p4 sexplib_p4
|
++ stdenv.lib.optionals asyncSupport [ async_p4 async_ssl_p4 ];
|
||||||
conduit stringext base64 magic-mime ounit async
|
propagatedBuildInputs = [ re stringext uri fieldslib_p4 sexplib_p4 base64 ];
|
||||||
async_ssl lwt ];
|
|
||||||
|
|
||||||
buildFlags = "PREFIX=$(out)";
|
buildFlags = "PREFIX=$(out)";
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{stdenv, fetchFromGitHub, ocaml, findlib, camlp4, core_p4, async_p4, async_unix_p4
|
{stdenv, fetchFromGitHub, ocaml, findlib, camlp4, core_p4, async_p4, async_unix_p4
|
||||||
, re2_p4, async_extra_p4, sexplib_p4, async_shell, core_extended_p4, async_find
|
, re2_p4, async_extra_p4, sexplib_p4, async_shell, core_extended_p4, async_find
|
||||||
, cohttp, uri, tzdata}:
|
, cohttp, conduit, magic-mime, uri, tzdata
|
||||||
|
}:
|
||||||
|
|
||||||
assert stdenv.lib.versionOlder "4.02" ocaml.version;
|
assert stdenv.lib.versionOlder "4.02" ocaml.version;
|
||||||
|
|
||||||
@ -16,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
buildInputs = [ ocaml findlib camlp4 ];
|
buildInputs = [ ocaml findlib camlp4 conduit magic-mime ];
|
||||||
propagatedBuildInputs = [ core_p4 async_p4 async_unix_p4
|
propagatedBuildInputs = [ core_p4 async_p4 async_unix_p4
|
||||||
async_extra_p4 sexplib_p4 async_shell core_extended_p4
|
async_extra_p4 sexplib_p4 async_shell core_extended_p4
|
||||||
async_find cohttp uri re2_p4 ];
|
async_find cohttp uri re2_p4 ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user