2018-05-13 16:28:22 +01:00
|
|
|
{ stdenv, fetchFromGitHub, ocaml, findlib, jbuilder
|
|
|
|
, ppx_tools_versioned
|
|
|
|
, ounit
|
|
|
|
}:
|
2016-07-19 09:04:32 +01:00
|
|
|
|
2018-05-13 16:28:22 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-bitstring-${version}";
|
|
|
|
version = "3.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xguerin";
|
|
|
|
repo = "bitstring";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0r49qax7as48jgknzaq6p9rbpmrvnmlic713wzz5bj60j5h0396f";
|
2016-07-19 09:04:32 +01:00
|
|
|
};
|
|
|
|
|
2018-05-13 16:28:22 +01:00
|
|
|
buildInputs = [ ocaml findlib jbuilder ppx_tools_versioned ounit ];
|
2016-07-19 09:04:32 +01:00
|
|
|
|
2018-05-13 16:28:22 +01:00
|
|
|
buildPhase = "jbuilder build";
|
2016-07-19 09:04:32 +01:00
|
|
|
|
2018-05-13 16:28:22 +01:00
|
|
|
doCheck = true;
|
|
|
|
checkPhase = "jbuilder runtest";
|
2016-07-19 09:04:32 +01:00
|
|
|
|
2018-05-13 16:28:22 +01:00
|
|
|
inherit (jbuilder) installPhase;
|
2016-07-19 09:04:32 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "This library adds Erlang-style bitstrings and matching over bitstrings as a syntax extension and library for OCaml";
|
2017-10-27 00:44:19 +01:00
|
|
|
homepage = https://github.com/xguerin/bitstring;
|
2018-05-13 16:28:22 +01:00
|
|
|
inherit (ocaml.meta) platforms;
|
2016-07-19 09:04:32 +01:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = [ maintainers.maurer ];
|
|
|
|
};
|
|
|
|
}
|