2017-03-12 07:29:54 +00:00
|
|
|
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, jbuilder, result }:
|
|
|
|
|
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}";
|
2017-08-25 20:27:19 +01:00
|
|
|
version = "1.0.4";
|
2017-03-12 07:29:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "let-def";
|
|
|
|
repo = "ocaml-migrate-parsetree";
|
|
|
|
rev = "v${version}";
|
2017-08-25 20:27:19 +01:00
|
|
|
sha256 = "0xwjll827anqngnqy746m2pd44mkhsaaqaqbir6z91xcqix2isvy";
|
2017-03-12 07:29:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib ocamlbuild jbuilder ];
|
|
|
|
propagatedBuildInputs = [ result ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
for p in *.install
|
|
|
|
do
|
|
|
|
${jbuilder.installPhase} $p
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|