nixpkgs-suyu/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix

31 lines
937 B
Nix
Raw Normal View History

2018-09-05 18:11:47 +02:00
{ stdenv, fetchurl, ocaml, findlib, dune, ocaml-migrate-parsetree }:
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01";
stdenv.mkDerivation rec {
pname = "ppx_gen_rec";
name = "ocaml${ocaml.version}-${pname}-${version}";
version = "1.0.0";
src = fetchurl {
url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
sha256 = "0qy0wa3rd5yh1612jijadi1yddfslpsmmmf69phi2dhr3vmkhza7";
};
unpackCmd = "tar xjf $src";
2018-09-05 18:11:47 +02:00
buildInputs = [ ocaml findlib dune ocaml-migrate-parsetree ];
2018-09-05 18:11:47 +02:00
buildPhase = "dune build -p ppx_gen_rec";
2018-09-05 18:11:47 +02:00
inherit (dune) installPhase;
meta = with stdenv.lib; {
homepage = https://github.com/flowtype/ocaml-ppx_gen_rec;
description = "ocaml preprocessor that generates a recursive module";
license = licenses.mit;
platforms = ocaml.meta.platforms or [];
maintainers = [ maintainers.frontsideair ];
};
}