about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/earley/default.nix
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2020-09-30 08:37:13 +0200
committerVincent Laporte <vbgl@users.noreply.github.com>2020-10-06 22:34:54 +0200
commite7ebd6be80d80000ea9efb62c589a827ba4c22dc (patch)
tree9af1053aeaed8978fba6d8e40903d9075da25c9d /pkgs/development/ocaml-modules/earley/default.nix
parentd83e5a1ff68f512f3f4c214a5907155cb843c03b (diff)
ocamlPackages.earley: 2.0.0 → 3.0.0
Diffstat (limited to 'pkgs/development/ocaml-modules/earley/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/earley/default.nix25
1 files changed, 15 insertions, 10 deletions
diff --git a/pkgs/development/ocaml-modules/earley/default.nix b/pkgs/development/ocaml-modules/earley/default.nix
index f47231a242e0c..c7b2d09d66743 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";