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

32 lines
824 B
Nix
Raw Normal View History

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