1{ lib, fetchurl, buildDunePackage
2, cstruct, cstruct-sexp, domain-name, fmt, ppx_cstruct, ppx_sexp_conv, logs, hkdf, mirage-crypto, mirage-crypto-ec, mirage-crypto-pk, mirage-crypto-rng, ocaml_lwt, ptime, sexplib, x509
3, ipaddr, ipaddr-sexp
4, alcotest, cstruct-unix, ounit2, randomconv
5}:
6
7buildDunePackage rec {
8 pname = "tls";
9 version = "0.16.0";
10
11 src = fetchurl {
12 url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-${version}.tbz";
13 sha256 = "sha256-uvIDZLNy6E/ce7YmzUUVaOeGRaHqPSUzuEPQDMu09tM=";
14 };
15
16 minimalOCamlVersion = "4.08";
17 duneVersion = "3";
18
19 propagatedBuildInputs = [
20 cstruct
21 cstruct-sexp
22 domain-name
23 fmt
24 ppx_cstruct
25 ppx_sexp_conv
26 logs
27 hkdf
28 mirage-crypto
29 mirage-crypto-ec
30 mirage-crypto-pk
31 mirage-crypto-rng
32 ocaml_lwt
33 ptime
34 sexplib
35 x509
36 ipaddr
37 ipaddr-sexp
38 ];
39
40 doCheck = true;
41 checkInputs = [
42 alcotest
43 cstruct-unix
44 ounit2
45 randomconv
46 ];
47
48 meta = with lib; {
49 homepage = "https://github.com/mirleft/ocaml-tls";
50 description = "TLS in pure OCaml";
51 license = licenses.bsd2;
52 maintainers = with maintainers; [ sternenseemann ];
53 };
54}