3
0
Fork 0
forked from mirrors/nixpkgs

ocamlPackages.earley: 1.0.2 -> 2.0.0

This commit is contained in:
Vincent Laporte 2019-05-21 22:17:57 +02:00 committed by Vincent Laporte
parent 3840e1e935
commit 3ca7fc10e8
3 changed files with 11 additions and 52 deletions

View file

@ -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";
};
}

View file

@ -1,30 +0,0 @@
{ stdenv, fetchFromGitHub, which, ocaml, findlib, ocamlbuild, earley }:
stdenv.mkDerivation rec {
version = "1.0.2";
name = "ocaml${ocaml.version}-earley_ocaml-${version}";
src = fetchFromGitHub {
owner = "rlepigre";
repo = "ocaml-earley-ocaml";
rev = "ocaml-earley-ocaml_${version}";
sha256 = "0f8kr49r2xfs7cbzps4r9i92ckhwssaiydam846jrky3z5djn2jc";
};
buildInputs = [ which ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ earley ];
preBuild = "make";
createFindlibDestdir = true;
installFlags = [ "BINDIR=$(out)/bin" ];
meta = {
description = "Extensible OCaml parser to be used with Earley";
license = stdenv.lib.licenses.cecill-b;
maintainers = [ stdenv.lib.maintainers.vbgl ];
inherit (ocaml.meta) platforms;
inherit (src.meta) homepage;
};
}

View file

@ -217,8 +217,6 @@ let
earley = callPackage ../development/ocaml-modules/earley { };
earley_ocaml = callPackage ../development/ocaml-modules/earley_ocaml { };
easy-format = callPackage ../development/ocaml-modules/easy-format { };
elina = callPackage ../development/ocaml-modules/elina { };