2017-12-14 08:36:29 +01:00
|
|
|
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg, cppo
|
2017-03-18 13:58:49 +01:00
|
|
|
, ppx_import, ppx_deriving, yojson, ounit
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-ppx_deriving_yojson-${version}";
|
2017-11-27 05:59:23 +01:00
|
|
|
version = "3.1";
|
2017-03-18 13:58:49 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-11-27 05:59:23 +01:00
|
|
|
owner = "ocaml-ppx";
|
2017-03-18 13:58:49 +01:00
|
|
|
repo = "ppx_deriving_yojson";
|
|
|
|
rev = "v${version}";
|
2017-11-27 05:59:23 +01:00
|
|
|
sha256 = "1pwfnq7z60nchba4gnf58918ll11w3gj5i88qhz1p2jm45hxqgnw";
|
2017-03-18 13:58:49 +01:00
|
|
|
};
|
|
|
|
|
2017-12-14 08:36:29 +01:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild cppo ounit ppx_import ];
|
2017-03-18 13:58:49 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ ppx_deriving yojson ];
|
|
|
|
|
|
|
|
inherit (topkg) installPhase;
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkTarget = "test";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A Yojson codec generator for OCaml >= 4.02.";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|