1 { lib, stdenv, fetchFromGitHub, ocamlPackages, CoreServices }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 hash = "sha256-ChAgAYvNjQ60ly8B4i4M0awjgke8IcjJK72TOQZNnzw=";
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";
35 homepage = "https://flow.org/";
36 changelog = "https://github.com/facebook/flow/blob/v${version}/Changelog.md";
37 license = licenses.mit;
38 platforms = ocamlPackages.ocaml.meta.platforms;
39 maintainers = with maintainers; [ marsam puffnfresh ];