ocamlPackage.ppx_import: init at 1.1

This commit is contained in:
Théo Zimmermann 2016-11-03 17:34:36 +01:00 committed by vbgl
parent 54a0e90a7c
commit 01910b1801
2 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,32 @@
{stdenv, fetchFromGitHub, buildOcaml, ocaml, opam,
cppo, ppx_tools, ounit, ppx_deriving}:
buildOcaml rec {
name = "ppx_import";
version = "1.1";
minimumSupportedOcamlVersion = "4.02";
src = fetchFromGitHub {
owner = "whitequark";
repo = "ppx_import";
rev = "v${version}";
sha256 = "1hfvbc81dg58q7kkpn808b3j0xazrqfrr4v71sd1yvmnk71wak6k";
};
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;
};
}

View file

@ -416,6 +416,8 @@ let
then callPackage ../development/ocaml-modules/ppx_deriving {}
else null;
ppx_import = callPackage ../development/ocaml-modules/ppx_import {};
ppx_tools =
if lib.versionAtLeast ocaml.version "4.02"
then callPackage ../development/ocaml-modules/ppx_tools {}