2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ocamlPackages, CoreServices }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "flow";
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "0.155.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebook";
|
|
|
|
repo = "flow";
|
|
|
|
rev = "refs/tags/v${version}";
|
2021-07-14 22:03:04 +00:00
|
|
|
sha256 = "sha256-NMqglKpVrGgkxnrxSKKUeQ9RZ3eamlO6CDlaHjwKA3I=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 bin/flow $out/bin/flow
|
|
|
|
install -Dm644 resources/shell/bash-completion $out/share/bash-completion/completions/flow
|
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
buildInputs = (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml-migrate-parsetree-2 dtoa core_kernel sedlex_2 ocaml_lwt lwt_log lwt_ppx ppx_deriving ppx_gen_rec ppx_tools_versioned visitors wtf8 ])
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ CoreServices ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A static type checker for JavaScript";
|
|
|
|
homepage = "https://flow.org/";
|
2021-06-06 07:54:09 +00:00
|
|
|
changelog = "https://github.com/facebook/flow/raw/v${version}/Changelog.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = ocamlPackages.ocaml.meta.platforms;
|
|
|
|
maintainers = with maintainers; [ marsam puffnfresh ];
|
|
|
|
};
|
|
|
|
}
|