2018-09-05 17:11:47 +01:00
|
|
|
{ stdenv, fetchFromGitHub, ocaml, findlib, dune, alcotest }:
|
2018-07-22 07:11:39 +01:00
|
|
|
|
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
|
|
|
|
then throw "bigstringaf is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "0.3.0";
|
|
|
|
name = "ocaml${ocaml.version}-bigstringaf-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "inhabitedtype";
|
|
|
|
repo = "bigstringaf";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1yx6hv8rk0ldz1h6kk00rwg8abpfc376z00aifl9f5rn7xavpscs";
|
|
|
|
};
|
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
buildInputs = [ ocaml findlib dune alcotest ];
|
2018-07-22 07:11:39 +01:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = "dune runtest";
|
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
inherit (dune) installPhase;
|
2018-07-22 07:11:39 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Bigstring intrinsics and fast blits based on memcpy/memmove";
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|