nixpkgs/pkgs/development/tools/analysis/flow/default.nix

31 lines
872 B
Nix
Raw Normal View History

2016-07-10 05:02:21 -07:00
{ stdenv, fetchFromGitHub, lib, ocaml, libelf, cf-private, CoreServices, git, mercurial }:
with lib;
stdenv.mkDerivation rec {
2016-07-10 05:02:21 -07:00
version = "0.28.0";
name = "flow-${version}";
src = fetchFromGitHub {
owner = "facebook";
repo = "flow";
rev = "v${version}";
2016-07-10 05:02:21 -07:00
sha256 = "1xryv1366zc385r82r6n832xkaqcm63zs1baizl02qchfzfa3am2";
};
installPhase = ''
mkdir -p $out/bin
cp bin/flow $out/bin/
'';
2016-07-10 05:02:21 -07:00
buildInputs = [ ocaml libelf git mercurial ] # git and mercurial are necessary because of https://github.com/facebook/flow/issues/1981
++ optionals stdenv.isDarwin [ cf-private CoreServices ];
meta = with stdenv.lib; {
description = "A static type checker for JavaScript";
homepage = http://flowtype.org;
license = licenses.bsd3;
platforms = platforms.unix;
2015-10-18 03:21:18 -07:00
maintainers = with maintainers; [ puffnfresh globin ];
};
}