at master 56 lines 951 B view raw
1{ 2 lib, 3 fetchurl, 4 buildDunePackage, 5 ppx_sexp_conv, 6 base64, 7 jsonm, 8 re, 9 stringext, 10 uri-sexp, 11 fmt, 12 alcotest, 13 crowbar, 14}: 15 16buildDunePackage rec { 17 pname = "cohttp"; 18 version = "5.3.1"; 19 20 minimalOCamlVersion = "4.08"; 21 22 src = fetchurl { 23 url = "https://github.com/mirage/ocaml-cohttp/releases/download/v${version}/cohttp-${version}.tbz"; 24 hash = "sha256-9eJz08Lyn/R71+Ftsj4fPWzQGkC+ACCJhbxDTIjUV2s="; 25 }; 26 27 postPatch = '' 28 substituteInPlace cohttp/src/dune --replace 'bytes base64' 'base64' 29 ''; 30 31 buildInputs = [ 32 jsonm 33 ppx_sexp_conv 34 ]; 35 36 propagatedBuildInputs = [ 37 base64 38 re 39 stringext 40 uri-sexp 41 ]; 42 43 doCheck = true; 44 checkInputs = [ 45 fmt 46 alcotest 47 crowbar 48 ]; 49 50 meta = { 51 description = "HTTP(S) library for Lwt, Async and Mirage"; 52 license = lib.licenses.isc; 53 maintainers = [ lib.maintainers.vbgl ]; 54 homepage = "https://github.com/mirage/ocaml-cohttp"; 55 }; 56}