From 3ca7fc10e851602fd8360446bbece868e4a4a167 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 21 May 2019 22:17:57 +0200 Subject: [PATCH] ocamlPackages.earley: 1.0.2 -> 2.0.0 --- .../ocaml-modules/earley/default.nix | 31 +++++++------------ .../ocaml-modules/earley_ocaml/default.nix | 30 ------------------ pkgs/top-level/ocaml-packages.nix | 2 -- 3 files changed, 11 insertions(+), 52 deletions(-) delete mode 100644 pkgs/development/ocaml-modules/earley_ocaml/default.nix diff --git a/pkgs/development/ocaml-modules/earley/default.nix b/pkgs/development/ocaml-modules/earley/default.nix index 576d9b2528f5..ab3011361e12 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"; }; } diff --git a/pkgs/development/ocaml-modules/earley_ocaml/default.nix b/pkgs/development/ocaml-modules/earley_ocaml/default.nix deleted file mode 100644 index 92a1eb1e5c8e..000000000000 --- a/pkgs/development/ocaml-modules/earley_ocaml/default.nix +++ /dev/null @@ -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; - }; -} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 8886647420c5..651cfa47e1a2 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -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 { };