nixpkgs-suyu/pkgs/development/ocaml-modules/lwt/4.x.nix
Vincent Laporte 22c50545f2 ocamlPackages.ocaml_lwt: 4.1.0 -> 4.2.1
Ensures compatibility with OCaml 4.08
2019-09-06 16:03:33 +00:00

33 lines
956 B
Nix

{ lib, fetchzip, pkgconfig, ncurses, libev, buildDunePackage, ocaml
, cppo, ocaml-migrate-parsetree, ppx_tools_versioned, result
, mmap, seq
}:
let inherit (lib) optional versionAtLeast; in
buildDunePackage rec {
pname = "lwt";
version = "4.2.1";
src = fetchzip {
url = "https://github.com/ocsigen/${pname}/archive/${version}.tar.gz";
sha256 = "1hz24fyhpm7d6603v399pgxvdl236srwagqja41ljvjx83y10ysr";
};
postPatch = ''
substituteInPlace lwt.opam \
--replace 'version: "dev"' 'version: "${version}"'
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ cppo ocaml-migrate-parsetree ppx_tools_versioned ]
++ optional (!versionAtLeast ocaml.version "4.07") ncurses;
propagatedBuildInputs = [ libev mmap seq result ];
meta = {
homepage = "https://ocsigen.org/lwt/";
description = "A cooperative threads library for OCaml";
maintainers = [ lib.maintainers.vbgl ];
license = lib.licenses.mit;
};
}