2018-09-05 17:11:47 +01:00
|
|
|
{ stdenv, fetchFromGitHub, ocaml, findlib, dune, alcotest }:
|
2017-12-05 18:16:19 +00:00
|
|
|
|
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
|
|
|
|
then throw "faraday is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-faraday-${version}";
|
|
|
|
version = "0.5.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "inhabitedtype";
|
|
|
|
repo = "faraday";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1kql0il1frsbx6rvwqd7ahi4m14ik6la5an6c2w4x7k00ndm4d7n";
|
|
|
|
};
|
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
buildInputs = [ ocaml findlib dune alcotest ];
|
2017-12-05 18:16:19 +00:00
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
buildPhase = "dune build -p faraday";
|
2017-12-05 18:16:19 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = "jbuilder runtest";
|
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
inherit (dune) installPhase;
|
2017-12-05 18:16:19 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Serialization library built for speed and memory efficiency";
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|