2018-11-05 22:38:48 -08:00
|
|
|
{ stdenv, fetchFromGitHub, ocamlPackages, cf-private, CoreServices }:
|
2014-11-18 19:55:36 -08:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-11-19 12:14:32 -08:00
|
|
|
version = "0.86.0";
|
2014-11-18 19:55:36 -08:00
|
|
|
name = "flow-${version}";
|
2016-03-28 08:16:29 -07:00
|
|
|
|
2014-11-18 19:55:36 -08:00
|
|
|
src = fetchFromGitHub {
|
2018-11-05 22:38:48 -08:00
|
|
|
owner = "facebook";
|
|
|
|
repo = "flow";
|
|
|
|
rev = "refs/tags/v${version}";
|
2018-11-19 12:14:32 -08:00
|
|
|
sha256 = "0sxg066bfkgqyq2fcjkff4jbhpxrzsqgz53h2b4wscxr076r9bjp";
|
2014-11-18 19:55:36 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-11-05 22:38:48 -08:00
|
|
|
install -Dm755 -t $out/bin bin/flow
|
2014-11-18 19:55:36 -08:00
|
|
|
'';
|
|
|
|
|
2018-11-05 22:38:48 -08:00
|
|
|
buildInputs = (with ocamlPackages; [ ocaml findlib ocamlbuild dtoa core_kernel sedlex ocaml_lwt lwt_log lwt_ppx ppx_deriving ppx_gen_rec ppx_tools_versioned visitors wtf8 ])
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ cf-private CoreServices ];
|
2014-11-18 19:55:36 -08:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A static type checker for JavaScript";
|
2018-11-05 22:38:48 -08:00
|
|
|
homepage = https://flow.org/;
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = ocamlPackages.ocaml.meta.platforms;
|
2015-10-18 03:21:18 -07:00
|
|
|
maintainers = with maintainers; [ puffnfresh globin ];
|
2014-11-18 19:55:36 -08:00
|
|
|
};
|
|
|
|
}
|