2016-11-03 17:34:36 +01:00
|
|
|
{stdenv, fetchFromGitHub, buildOcaml, ocaml, opam,
|
|
|
|
cppo, ppx_tools, ounit, ppx_deriving}:
|
|
|
|
|
|
|
|
buildOcaml rec {
|
|
|
|
name = "ppx_import";
|
|
|
|
|
2017-11-26 21:08:53 +01:00
|
|
|
version = "1.4";
|
2016-11-03 17:34:36 +01:00
|
|
|
|
|
|
|
minimumSupportedOcamlVersion = "4.02";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-11-26 21:08:53 +01:00
|
|
|
owner = "ocaml-ppx";
|
2016-11-03 17:34:36 +01:00
|
|
|
repo = "ppx_import";
|
|
|
|
rev = "v${version}";
|
2017-11-26 21:08:53 +01:00
|
|
|
sha256 = "14c2lp7r9080c4hsb1y1drbxxx3v44b7ib5wfh3kkh3f1jfsjwbk";
|
2016-11-03 17:34:36 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ cppo ounit ppx_deriving opam ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkTarget = "test";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
opam-installer --script --prefix=$out ppx_import.install | sh
|
|
|
|
ln -s $out/lib/ppx_import $out/lib/ocaml/${ocaml.version}/site-lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A syntax extension that allows to pull in types or signatures from other compiled interface files";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
2017-11-26 21:08:53 +01:00
|
|
|
}
|