summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/cohttp/async.nix
blob: 2ad452ff6e66e25cb7491698c5544db687398073 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{ lib
, fetchpatch
, fetchurl
, buildDunePackage
, ppx_sexp_conv
, base
, async
, async_kernel
, async_unix
, cohttp
, conduit-async
, core_unix
, uri
, uri-sexp
, logs
, fmt
, sexplib0
, ipaddr
, magic-mime
, ounit
, mirage-crypto
, core
}:

buildDunePackage {
  pname = "cohttp-async";

  inherit (cohttp)
    version
    src
    ;

  buildInputs = [ ppx_sexp_conv ];

  propagatedBuildInputs = [
    cohttp
    conduit-async
    async_kernel
    async_unix
    async
    base
    core_unix
    magic-mime
    logs
    fmt
    sexplib0
    uri
    uri-sexp
    ipaddr
  ];

  # Examples don't compile with core 0.15.  See https://github.com/mirage/ocaml-cohttp/pull/864.
  doCheck = false;
  checkInputs = [
    ounit
    mirage-crypto
    core
  ];

  # Compatibility with core 0.15.  No longer needed after updating cohttp to 5.0.0.
  patches = fetchpatch {
    url = "https://github.com/mirage/ocaml-cohttp/commit/5a7124478ed31c6b1fa6a9a50602c2ec839083b5.patch";
    sha256 = "0i99rl8604xqwb6d0yzk9ws4dflbn0j4hv2nba2qscbqrrn22rw3";
  };
  patchFlags = "-p1 -F3";

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