1 { lib, stdenv, fetchFromGitHub, ocamlPackages, CoreServices }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-IOy6zsDGUfiSeOalQnku/4uNyjqpz2bMcpmf7Vq9fyI=";
15 substituteInPlace src/services/inference/check_cache.ml --replace 'Core_kernel' 'Core'
18 makeFlags = [ "FLOW_RELEASE=1" ];
21 install -Dm755 bin/flow $out/bin/flow
22 install -Dm644 resources/shell/bash-completion $out/share/bash-completion/completions/flow
27 nativeBuildInputs = with ocamlPackages; [ ocaml dune_3 findlib ocamlbuild ];
29 buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]
30 ++ (with ocamlPackages; [ core_kernel dtoa fileutils lwt_log lwt_ppx ocaml_lwt ppx_deriving ppx_gen_rec ppx_let sedlex visitors wtf8 ] ++ lib.optionals stdenv.isLinux [ inotify ]);
33 description = "A static type checker for JavaScript";
34 homepage = "https://flow.org/";
35 changelog = "https://github.com/facebook/flow/blob/v${version}/Changelog.md";
36 license = licenses.mit;
37 platforms = ocamlPackages.ocaml.meta.platforms;
38 maintainers = with maintainers; [ marsam puffnfresh ];