nixpkgs/pkgs/development/ocaml-modules/ppx_import/default.nix

32 lines
824 B
Nix
Raw Normal View History

2018-12-05 09:31:47 +00:00
{ lib, fetchFromGitHub, buildDunePackage, ocaml
, ounit, ppx_deriving, ppx_tools_versioned
2018-09-10 06:45:15 +01:00
}:
2016-11-03 16:34:36 +00:00
2018-12-05 09:31:47 +00:00
if !lib.versionAtLeast ocaml.version "4.04"
2018-09-10 06:45:15 +01:00
then throw "ppx_import is not available for OCaml ${ocaml.version}"
else
2016-11-03 16:34:36 +00:00
2018-12-05 09:31:47 +00:00
buildDunePackage rec {
pname = "ppx_import";
version = "1.5-3";
2016-11-03 16:34:36 +00:00
src = fetchFromGitHub {
2017-11-26 20:08:53 +00:00
owner = "ocaml-ppx";
2016-11-03 16:34:36 +00:00
repo = "ppx_import";
2018-12-05 09:31:47 +00:00
rev = "bd627d5afee597589761d6fee30359300b5e1d80";
sha256 = "1f9bphif1izhyx72hvwpkd9kxi9lfvygaicy6nbxyp6qgc87z4nm";
2016-11-03 16:34:36 +00:00
};
2018-12-05 09:31:47 +00:00
buildInputs = [ ounit ppx_deriving ];
propagatedBuildInputs = [ ppx_tools_versioned ];
2016-11-03 16:34:36 +00:00
doCheck = true;
checkTarget = "test";
2018-12-05 09:31:47 +00:00
meta = {
2016-11-03 16:34:36 +00:00
description = "A syntax extension that allows to pull in types or signatures from other compiled interface files";
2018-12-05 09:31:47 +00:00
license = lib.licenses.mit;
2018-09-10 06:45:15 +01:00
inherit (src.meta) homepage;
2016-11-03 16:34:36 +00:00
};
2017-11-26 20:08:53 +00:00
}