ocamlPackages.ppx_deriving: 4.2.1 -> 4.4

This commit is contained in:
Vincent Laporte 2019-08-14 15:35:33 +00:00 committed by Vincent Laporte
parent 4759568c6b
commit 4c571a1e76

View File

@ -1,41 +1,22 @@
{ stdenv, ocaml, findlib, ocamlbuild, fetchzip { lib, fetchzip, buildDunePackage
, cppo, ppx_tools, ppx_derivers, result, ounit, ocaml-migrate-parsetree , cppo, ppxfind, ppx_tools, ppx_derivers, result, ounit, ocaml-migrate-parsetree
}: }:
if !stdenv.lib.versionAtLeast ocaml.version "4.02" buildDunePackage rec {
then throw "ppx_deriving is not available for OCaml ${ocaml.version}" pname = "ppx_deriving";
else version = "4.4";
let param =
if ocaml.version == "4.03.0"
then {
version = "4.1";
sha256 = "0cy9p8d8cbcxvqyyv8fz2z9ypi121zrgaamdlp4ld9f3jnwz7my9";
extraPropagatedBuildInputs = [];
} else {
version = "4.2.1";
sha256 = "1yhhjnncbbb7fsif7qplndh01s1xd72dqm8f3jkgx9y4ariqqvf9";
extraPropagatedBuildInputs = [ ocaml-migrate-parsetree ppx_derivers ];
}; in
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-ppx_deriving-${version}";
inherit (param) version;
src = fetchzip { src = fetchzip {
url = "https://github.com/ocaml-ppx/ppx_deriving/archive/v${version}.tar.gz"; url = "https://github.com/ocaml-ppx/ppx_deriving/archive/v${version}.tar.gz";
inherit (param) sha256; sha256 = "0b2gaxlh54pcz3b4891yd143nx852mwggcy0yhq8g85dl3iisxzq";
}; };
buildInputs = [ ocaml findlib ocamlbuild cppo ounit ]; buildInputs = [ ppxfind cppo ounit ];
propagatedBuildInputs = param.extraPropagatedBuildInputs ++ propagatedBuildInputs = [ ocaml-migrate-parsetree ppx_derivers ppx_tools result ];
[ ppx_tools result ];
createFindlibDestdir = true; doCheck = true;
installPhase = "OCAMLPATH=$OCAMLPATH:`ocamlfind printconf destdir` make install"; meta = with lib; {
meta = with stdenv.lib; {
description = "deriving is a library simplifying type-driven code generation on OCaml >=4.02."; description = "deriving is a library simplifying type-driven code generation on OCaml >=4.02.";
maintainers = [ maintainers.maurer ]; maintainers = [ maintainers.maurer ];
license = licenses.mit; license = licenses.mit;