From e7ebd6be80d80000ea9efb62c589a827ba4c22dc Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 30 Sep 2020 08:37:13 +0200 Subject: [PATCH] =?UTF-8?q?ocamlPackages.earley:=202.0.0=20=E2=86=92=203.0?= =?UTF-8?q?.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/earley/default.nix | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/development/ocaml-modules/earley/default.nix b/pkgs/development/ocaml-modules/earley/default.nix index f47231a242e..c7b2d09d667 100644 --- a/pkgs/development/ocaml-modules/earley/default.nix +++ b/pkgs/development/ocaml-modules/earley/default.nix @@ -1,18 +1,23 @@ -{ lib, fetchurl, ocaml, buildDunePackage }: - -if lib.versionAtLeast ocaml.version "4.08" -then throw "earley is not available for OCaml ${ocaml.version}" -else +{ lib, fetchFromGitHub, ocaml, buildDunePackage +, stdlib-shims +}: buildDunePackage rec { - version = "2.0.0"; + version = "3.0.0"; pname = "earley"; - src = fetchurl { - url = "https://github.com/rlepigre/ocaml-earley/releases/download/${version}/earley-${version}.tbz"; - sha256 = "1kjr0wh3lji7f493kf48rphxnlv3sygj5a8rmx9z3xkpbd7aqyyw"; + src = fetchFromGitHub { + owner = "rlepigre"; + repo = "ocaml-earley"; + rev = version; + sha256 = "1vi58zdxchpw6ai0bz9h2ggcmg8kv57yk6qbx82lh47s5wb3mz5y"; }; - minimumOCamlVersion = "4.03"; + minimumOCamlVersion = "4.07"; + useDune2 = true; + + buildInputs = [ stdlib-shims ]; + + doCheck = true; meta = { description = "Parser combinators based on Earley Algorithm";