mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 04:03:56 +00:00
38 lines
1.0 KiB
Nix
38 lines
1.0 KiB
Nix
{ stdenv, fetchFromGitHub, ocaml, findlib, jbuilder, alcotest, result
|
|
, bigstringaf
|
|
}:
|
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
|
|
then throw "angstrom is not available for OCaml ${ocaml.version}"
|
|
else
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "0.10.0";
|
|
name = "ocaml${ocaml.version}-angstrom-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "inhabitedtype";
|
|
repo = "angstrom";
|
|
rev = "${version}";
|
|
sha256 = "0lh6024yf9ds0nh9i93r9m6p5psi8nvrqxl5x7jwl13zb0r9xfpw";
|
|
};
|
|
|
|
buildInputs = [ ocaml findlib jbuilder alcotest ];
|
|
propagatedBuildInputs = [ bigstringaf result ];
|
|
|
|
buildPhase = "jbuilder build -p angstrom";
|
|
|
|
doCheck = true;
|
|
checkPhase = "jbuilder runtest -p angstrom";
|
|
|
|
inherit (jbuilder) installPhase;
|
|
|
|
meta = {
|
|
homepage = https://github.com/inhabitedtype/angstrom;
|
|
description = "OCaml parser combinators built for speed and memory efficiency";
|
|
license = stdenv.lib.licenses.bsd3;
|
|
maintainers = with stdenv.lib.maintainers; [ sternenseemann ];
|
|
inherit (ocaml.meta) platforms;
|
|
};
|
|
}
|