@@ -1,18 +1,23 @@
1−{ lib, fetchurl, ocaml, buildDunePackage }:
2−
3−if lib.versionAtLeast ocaml.version "4.08"
4−then throw "earley is not available for OCaml ${ocaml.version}"
5−else
1+{ lib, fetchFromGitHub, ocaml, buildDunePackage
2+, stdlib-shims
3+}:
64
75buildDunePackage rec {
8− version = "2.0.0";
6+ version = "3.0.0";
97 pname = "earley";
10− src = fetchurl {
11− url = "https://github.com/rlepigre/ocaml-earley/releases/download/${version}/earley-${version}.tbz";
12− sha256 = "1kjr0wh3lji7f493kf48rphxnlv3sygj5a8rmx9z3xkpbd7aqyyw";
8+ src = fetchFromGitHub {
9+ owner = "rlepigre";
10+ repo = "ocaml-earley";
11+ rev = version;
12+ sha256 = "1vi58zdxchpw6ai0bz9h2ggcmg8kv57yk6qbx82lh47s5wb3mz5y";
1313 };
1414
15− minimumOCamlVersion = "4.03";
15+ minimumOCamlVersion = "4.07";
16+ useDune2 = true;
17+
18+ buildInputs = [ stdlib-shims ];
19+
20+ doCheck = true;
1621
1722 meta = {
1823 description = "Parser combinators based on Earley Algorithm";