2018-09-05 17:11:47 +01:00
|
|
|
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, dune, result }:
|
2017-03-12 07:29:54 +00:00
|
|
|
|
2017-07-10 19:18:09 +01:00
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
|
|
|
|
then throw "ocaml-migrate-parsetree is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2017-03-12 07:29:54 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-ocaml-migrate-parsetree-${version}";
|
2018-07-05 09:50:50 +01:00
|
|
|
version = "1.0.11";
|
2017-03-12 07:29:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-07-05 09:50:50 +01:00
|
|
|
owner = "ocaml-ppx";
|
2017-03-12 07:29:54 +00:00
|
|
|
repo = "ocaml-migrate-parsetree";
|
|
|
|
rev = "v${version}";
|
2018-07-05 09:50:50 +01:00
|
|
|
sha256 = "05kbgs9n1x64fk6g3wbjnwjd17w10k3k8dzglnc45xg4hr7z651n";
|
2017-03-12 07:29:54 +00:00
|
|
|
};
|
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild dune ];
|
2017-03-12 07:29:54 +00:00
|
|
|
propagatedBuildInputs = [ result ];
|
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
inherit (dune) installPhase;
|
2017-03-12 07:29:54 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Convert OCaml parsetrees between different major versions";
|
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|