2017-07-01 13:16:27 +02:00
|
|
|
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild
|
|
|
|
, ppx_fields_conv, ppx_sexp_conv
|
|
|
|
, base64, fieldslib, uri, conduit
|
|
|
|
# Optional for async and lwt support:
|
|
|
|
, async , async_ssl, cmdliner, fmt, magic-mime, ocaml_lwt, tls
|
2016-11-12 09:55:42 +01:00
|
|
|
}:
|
2015-05-15 16:36:30 +02:00
|
|
|
|
2017-07-01 13:16:27 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "0.22.0";
|
|
|
|
name = "ocaml${ocaml.version}-cohttp-${version}";
|
2015-05-15 16:36:30 +02:00
|
|
|
|
2017-07-01 13:16:27 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mirage";
|
|
|
|
repo = "ocaml-cohttp";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1iy4ynh0yrw8337nsa9zvgcf476im0bhccsbs0vki3c5yxw2x60d";
|
|
|
|
};
|
2015-05-15 16:36:30 +02:00
|
|
|
|
2017-07-01 13:16:27 +02:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild ppx_fields_conv ppx_sexp_conv conduit
|
|
|
|
async async_ssl cmdliner fmt magic-mime ocaml_lwt tls ];
|
2015-05-15 16:36:30 +02:00
|
|
|
|
2017-07-01 13:16:27 +02:00
|
|
|
propagatedBuildInputs = [ base64 fieldslib uri ];
|
2015-05-15 16:36:30 +02:00
|
|
|
|
2017-07-01 13:16:27 +02:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2015-05-15 16:36:30 +02:00
|
|
|
|
2017-07-01 13:16:27 +02:00
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "HTTP(S) library for Lwt, Async and Mirage";
|
|
|
|
license = stdenv.lib.licenses.isc;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
2015-05-15 16:36:30 +02:00
|
|
|
}
|