@@ -1,29 +1,33 @@
1−{ stdenv, fetchzip, pkgconfig, ncurses, libev, buildDunePackage, ocaml
1+{ lib, fetchzip, pkgconfig, ncurses, libev, buildDunePackage, ocaml
22, cppo, ocaml-migrate-parsetree, ppx_tools_versioned, result
3+, mmap, seq
34}:
45
5−let inherit (stdenv.lib) optional versionAtLeast; in
6+let inherit (lib) optional versionAtLeast; in
67
78buildDunePackage rec {
89 pname = "lwt";
9− version = "4.1.0";
10+ version = "4.2.1";
1011
1112 src = fetchzip {
1213 url = "https://github.com/ocsigen/${pname}/archive/${version}.tar.gz";
13− sha256 = "16wnc61kfj54z4q8sn9f5iik37pswz328hcz3z6rkza3kh3s6wmm";
14+ sha256 = "1hz24fyhpm7d6603v399pgxvdl236srwagqja41ljvjx83y10ysr";
1415 };
1516
17+ postPatch = ''
18+ substituteInPlace lwt.opam \
19+ --replace 'version: "dev"' 'version: "${version}"'
20+ '';
21+
1622 nativeBuildInputs = [ pkgconfig ];
1723 buildInputs = [ cppo ocaml-migrate-parsetree ppx_tools_versioned ]
1824 ++ optional (!versionAtLeast ocaml.version "4.07") ncurses;
19− propagatedBuildInputs = [ libev result ];
20−
21− configurePhase = "ocaml src/util/configure.ml -use-libev true";
25+ propagatedBuildInputs = [ libev mmap seq result ];
2226
2327 meta = {
2428 homepage = "https://ocsigen.org/lwt/";
2529 description = "A cooperative threads library for OCaml";
26− maintainers = [ stdenv.lib.maintainers.vbgl ];
27− license = stdenv.lib.licenses.lgpl21;
30+ maintainers = [ lib.maintainers.vbgl ];
31+ license = lib.licenses.mit;
2832 };
2933}