diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2019-01-04 18:50:22 +0100 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2019-01-12 08:23:48 +0000 |
commit | db217a8acaaff759b3f8d097547f5fc7de9c333c (patch) | |
tree | 32294adf3a42c8fda704b1aa37860ebce840d816 /pkgs/development/ocaml-modules/resource-pooling | |
parent | 98686d3b7f9bf156331b88c2a543da224a63e0e2 (diff) |
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
Diffstat (limited to 'pkgs/development/ocaml-modules/resource-pooling')
-rw-r--r-- | pkgs/development/ocaml-modules/resource-pooling/default.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/resource-pooling/default.nix b/pkgs/development/ocaml-modules/resource-pooling/default.nix new file mode 100644 index 0000000000000..71f2d51060cfe --- /dev/null +++ b/pkgs/development/ocaml-modules/resource-pooling/default.nix @@ -0,0 +1,35 @@ +{ 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 ]; + }; +} |