lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 18.03-beta 57 lines 1.8 kB view raw
1{ stdenv, buildOcaml, fetchzip, which, cryptopp, ocaml, findlib, ocamlbuild, camlp4 2, react, ssl, libev, pkgconfig, ncurses, glib 3, ppx_tools, result, cppo 4, ppxSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02" 5, version ? if stdenv.lib.versionAtLeast ocaml.version "4.02" then "2.7.1" else "2.6.0" 6}: 7 8if !stdenv.lib.versionAtLeast ocaml.version "4" 9then throw "lwt is not available for OCaml ${ocaml.version}" 10else 11 12let sha256 = { 13 "3.0.0" = "0wwhnl9hppixcsdisinj1wmffx0nv6hkpm01z9qvkngkrazi3i88"; 14 "2.7.1" = "0w7f59havrl2fsnvs84lm7wlqpsrldg80gy5afpnpr21zkw22g8w"; 15 "2.6.0" = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w"; 16}."${version}"; in 17 18let optionals = stdenv.lib.optionals (!stdenv.lib.versionAtLeast version "3"); in 19 20buildOcaml rec { 21 name = "lwt"; 22 inherit version; 23 24 src = fetchzip { 25 url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz"; 26 inherit sha256; 27 }; 28 29 nativeBuildInputs = [ pkgconfig ]; 30 buildInputs = [ which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 cppo ] 31 ++ stdenv.lib.optional ppxSupport ppx_tools; 32 33 propagatedBuildInputs = [ result ] 34 ++ optionals [ react ssl ] 35 ++ [ libev ]; 36 37 configureScript = "ocaml setup.ml -configure"; 38 prefixKey = "--prefix "; 39 configureFlags = 40 optionals [ "--enable-glib" "--enable-ssl" "--enable-react" ] 41 ++ [ "--enable-camlp4" ] 42 ++ [ (if ppxSupport then "--enable-ppx" else "--disable-ppx") ]; 43 44 createFindlibDestdir = true; 45 46 hasSharedObjects = true; 47 48 meta = with stdenv.lib; { 49 homepage = http://ocsigen.org/lwt; 50 description = "Lightweight thread library for Objective Caml"; 51 license = licenses.lgpl21; 52 platforms = ocaml.meta.platforms or []; 53 maintainers = with maintainers; [ 54 z77z vbgl gal_bolle 55 ]; 56 }; 57}