ocamlPackages.cohttp: 0.19.3 -> 0.22.0
Keeping the old version under attribute cohttp_p4
This commit is contained in:
parent
fe9147a042
commit
6875115b8e
30
pkgs/development/ocaml-modules/cohttp/0.19.3.nix
Normal file
30
pkgs/development/ocaml-modules/cohttp/0.19.3.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{ stdenv, buildOcaml, fetchurl, ocaml, cmdliner, re, uri_p4, 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.01";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/mirage/ocaml-cohttp/archive/v${version}.tar.gz";
|
||||||
|
sha256 = "1nrzpd4h52c1hnzcgsz462676saj9zss708ng001h54dglk8i1iv";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ alcotest cmdliner conduit magic-mime ounit lwt ]
|
||||||
|
++ stdenv.lib.optionals asyncSupport [ async_p4 async_ssl_p4 ];
|
||||||
|
propagatedBuildInputs = [ re stringext uri_p4 fieldslib_p4 sexplib_p4 base64 ];
|
||||||
|
|
||||||
|
buildFlags = "PREFIX=$(out)";
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = https://github.com/mirage/ocaml-cohttp;
|
||||||
|
description = "Very lightweight HTTP server using Lwt or Async";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = [ maintainers.ericbmerritt ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,30 +1,35 @@
|
|||||||
{ stdenv, buildOcaml, fetchurl, ocaml, cmdliner, re, uri_p4, fieldslib_p4
|
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild
|
||||||
, sexplib_p4, conduit , stringext, base64, magic-mime, ounit, alcotest
|
, ppx_fields_conv, ppx_sexp_conv
|
||||||
, asyncSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
|
, base64, fieldslib, uri, conduit
|
||||||
, lwt ? null, async_p4 ? null, async_ssl_p4 ? null
|
# Optional for async and lwt support:
|
||||||
|
, async , async_ssl, cmdliner, fmt, magic-mime, ocaml_lwt, tls
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildOcaml rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "cohttp";
|
version = "0.22.0";
|
||||||
version = "0.19.3";
|
name = "ocaml${ocaml.version}-cohttp-${version}";
|
||||||
|
|
||||||
minimumSupportedOcamlVersion = "4.01";
|
src = fetchFromGitHub {
|
||||||
|
owner = "mirage";
|
||||||
|
repo = "ocaml-cohttp";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1iy4ynh0yrw8337nsa9zvgcf476im0bhccsbs0vki3c5yxw2x60d";
|
||||||
|
};
|
||||||
|
|
||||||
src = fetchurl {
|
buildInputs = [ ocaml findlib ocamlbuild ppx_fields_conv ppx_sexp_conv conduit
|
||||||
url = "https://github.com/mirage/ocaml-cohttp/archive/v${version}.tar.gz";
|
async async_ssl cmdliner fmt magic-mime ocaml_lwt tls ];
|
||||||
sha256 = "1nrzpd4h52c1hnzcgsz462676saj9zss708ng001h54dglk8i1iv";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [ alcotest cmdliner conduit magic-mime ounit lwt ]
|
propagatedBuildInputs = [ base64 fieldslib uri ];
|
||||||
++ stdenv.lib.optionals asyncSupport [ async_p4 async_ssl_p4 ];
|
|
||||||
propagatedBuildInputs = [ re stringext uri_p4 fieldslib_p4 sexplib_p4 base64 ];
|
|
||||||
|
|
||||||
buildFlags = "PREFIX=$(out)";
|
makeFlags = [ "PREFIX=$(out)" ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
createFindlibDestdir = true;
|
||||||
homepage = https://github.com/mirage/ocaml-cohttp;
|
|
||||||
description = "Very lightweight HTTP server using Lwt or Async";
|
meta = {
|
||||||
license = licenses.mit;
|
description = "HTTP(S) library for Lwt, Async and Mirage";
|
||||||
maintainers = [ maintainers.ericbmerritt ];
|
license = stdenv.lib.licenses.isc;
|
||||||
};
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
||||||
|
inherit (src.meta) homepage;
|
||||||
|
inherit (ocaml.meta) platforms;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -128,10 +128,15 @@ let
|
|||||||
|
|
||||||
cmdliner_1_0 = callPackage ../development/ocaml-modules/cmdliner/1.0.nix { };
|
cmdliner_1_0 = callPackage ../development/ocaml-modules/cmdliner/1.0.nix { };
|
||||||
|
|
||||||
cohttp = callPackage ../development/ocaml-modules/cohttp {
|
cohttp_p4 = callPackage ../development/ocaml-modules/cohttp/0.19.3.nix {
|
||||||
lwt = ocaml_lwt;
|
lwt = ocaml_lwt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cohttp =
|
||||||
|
if lib.versionOlder "4.03" ocaml.version
|
||||||
|
then callPackage ../development/ocaml-modules/cohttp { }
|
||||||
|
else cohttp_p4;
|
||||||
|
|
||||||
conduit_p4 = callPackage ../development/ocaml-modules/conduit/0.10.0.nix {
|
conduit_p4 = callPackage ../development/ocaml-modules/conduit/0.10.0.nix {
|
||||||
lwt = ocaml_lwt;
|
lwt = ocaml_lwt;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user