about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/cohttp/async.nix
blob: 21e22533f1b26bc98b329c52a38a8b66048e5075 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ lib, buildDunePackage, async, cohttp, conduit-async, uri, ppx_sexp_conv
, logs, magic-mime }:

if !lib.versionAtLeast cohttp.version "0.99" then
  cohttp
else if !lib.versionAtLeast async.version "0.13" then
  throw "cohttp-async needs async-0.13 (hence OCaml >= 4.08)"
else

  buildDunePackage {
    pname = "cohttp-async";
    useDune2 = true;
    inherit (cohttp) version src;

    buildInputs = [ ppx_sexp_conv ];

    propagatedBuildInputs = [ async cohttp conduit-async logs magic-mime uri ];

    meta = cohttp.meta // {
      description = "CoHTTP implementation for the Async concurrency library";
    };
  }