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>2019-05-21 22:17:57 +0200
committerVincent Laporte <vbgl@users.noreply.github.com>2019-05-29 08:29:09 +0200
commit3ca7fc10e851602fd8360446bbece868e4a4a167 (patch)
treee3366631df1f2576738570c19ad892bec705ca05 /pkgs/development/ocaml-modules/earley/default.nix
parent3840e1e9350a544ba4850c7bce31d453eed3ffcd (diff)
downloadnixpkgs-3ca7fc10e851602fd8360446bbece868e4a4a167.tar
nixpkgs-3ca7fc10e851602fd8360446bbece868e4a4a167.tar.gz
nixpkgs-3ca7fc10e851602fd8360446bbece868e4a4a167.tar.bz2
nixpkgs-3ca7fc10e851602fd8360446bbece868e4a4a167.tar.lz
nixpkgs-3ca7fc10e851602fd8360446bbece868e4a4a167.tar.xz
nixpkgs-3ca7fc10e851602fd8360446bbece868e4a4a167.tar.zst
nixpkgs-3ca7fc10e851602fd8360446bbece868e4a4a167.zip
ocamlPackages.earley: 1.0.2 -> 2.0.0
Diffstat (limited to 'pkgs/development/ocaml-modules/earley/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/earley/default.nix31
1 files changed, 11 insertions, 20 deletions
diff --git a/pkgs/development/ocaml-modules/earley/default.nix b/pkgs/development/ocaml-modules/earley/default.nix
index 576d9b2528f..ab3011361e1 100644
--- a/pkgs/development/ocaml-modules/earley/default.nix
+++ b/pkgs/development/ocaml-modules/earley/default.nix
@@ -1,28 +1,19 @@
-{ stdenv, fetchFromGitHub, which, ocaml, findlib, ocamlbuild }:
+{ lib, fetchurl, buildDunePackage }:
 
-if !stdenv.lib.versionAtLeast ocaml.version "4.03"
-then throw "earley is not available for OCaml ${ocaml.version}"
-else
-
-stdenv.mkDerivation rec {
-  version = "1.0.2";
-  name = "ocaml${ocaml.version}-earley-${version}";
-  src = fetchFromGitHub {
-    owner = "rlepigre";
-    repo = "ocaml-earley";
-    rev = "ocaml-earley_${version}";
-    sha256 = "110njakmx1hyq42hyr6gx6qhaxly860whfhd6r0vks4yfp68qvcx";
+buildDunePackage rec {
+  version = "2.0.0";
+  pname = "earley";
+  src = fetchurl {
+    url = "https://github.com/rlepigre/ocaml-earley/releases/download/${version}/earley-${version}.tbz";
+    sha256 = "1kjr0wh3lji7f493kf48rphxnlv3sygj5a8rmx9z3xkpbd7aqyyw";
   };
 
-  buildInputs = [ which ocaml findlib ocamlbuild ];
-
-  createFindlibDestdir = true;
+  minimumOCamlVersion = "4.03";
 
   meta = {
     description = "Parser combinators based on Earley Algorithm";
-    license = stdenv.lib.licenses.cecill-b;
-    maintainers = [ stdenv.lib.maintainers.vbgl ];
-    inherit (ocaml.meta) platforms;
-    inherit (src.meta) homepage;
+    license = lib.licenses.cecill-b;
+    maintainers = [ lib.maintainers.vbgl ];
+    homepage = "https://github.com/rlepigre/ocaml-earley";
   };
 }