3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/resource-pooling/default.nix
Vincent Laporte db217a8aca ocamlPackages.resource-pooling: init at 0.5.2
A library for pooling resources like connections, threads, or similar.

Homepage: https://github.com/ocsigen/resource-pooling
2019-01-12 08:23:48 +00:00

36 lines
1,021 B
Nix

{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, lwt_log }:
let pname = "resource-pooling"; in
if !stdenv.lib.versionAtLeast ocaml.version "4.06"
then throw "${pname} is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
version = "0.5.2";
name = "ocaml${ocaml.version}-${pname}-${version}";
src = fetchFromGitHub {
owner = "ocsigen";
repo = pname;
rev = version;
sha256 = "00rz1i61w2dy108hzv38rblnsv6b56b5a1mk5h3zddpivcljp2dh";
};
buildInputs = [ ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ lwt_log ];
configurePhase = "ocaml setup.ml -configure --prefix $out";
buildPhase = "ocaml setup.ml -build";
createFindlibDestdir = true;
installPhase = "ocaml setup.ml -install";
meta = {
inherit (src.meta) homepage;
inherit (ocaml.meta) platforms;
description = "A library for pooling resources like connections, threads, or similar";
license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.vbgl ];
};
}