1{ stdenv, fetchFromGitHub, lib, ocaml, libelf, cf-private, CoreServices,
2 findlib, camlp4, sedlex, ocamlbuild, ocaml_lwt, wtf8, dtoa }:
3
4with lib;
5
6stdenv.mkDerivation rec {
7 version = "0.66.0";
8 name = "flow-${version}";
9
10 src = fetchFromGitHub {
11 owner = "facebook";
12 repo = "flow";
13 rev = "v${version}";
14 sha256 = "0l1sdd1n0llmz8m81vym3zhcn824sr9w46h9jpb7i7wrcm4y410d";
15 };
16
17 installPhase = ''
18 mkdir -p $out/bin
19 cp bin/flow $out/bin/
20 '';
21
22 buildInputs = [
23 ocaml libelf findlib camlp4 sedlex ocamlbuild ocaml_lwt wtf8 dtoa
24 ] ++ optionals stdenv.isDarwin [ cf-private CoreServices ];
25
26 meta = with stdenv.lib; {
27 description = "A static type checker for JavaScript";
28 homepage = http://flowtype.org;
29 license = licenses.bsd3;
30 platforms = [ "x86_64-linux" "x86_64-darwin" ];
31 maintainers = with maintainers; [ puffnfresh globin ];
32 };
33}