nixpkgs/pkgs/development/ocaml-modules/lwt/4.x.nix

34 lines
956 B
Nix
Raw Normal View History

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