c7e6337bd0
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
40 lines
1.3 KiB
Nix
40 lines
1.3 KiB
Nix
{ lib, stdenv, fetchFromGitHub, ocamlPackages, CoreServices }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "flow";
|
|
version = "0.205.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "facebook";
|
|
repo = "flow";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-+F0NmE9BN8eSmyLnXkgdYy3qdyBvKfRM+hVgYmLvzOg=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/services/inference/check_cache.ml --replace 'Core_kernel' 'Core'
|
|
'';
|
|
|
|
makeFlags = [ "FLOW_RELEASE=1" ];
|
|
|
|
installPhase = ''
|
|
install -Dm755 bin/flow $out/bin/flow
|
|
install -Dm644 resources/shell/bash-completion $out/share/bash-completion/completions/flow
|
|
'';
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = with ocamlPackages; [ ocaml dune_3 findlib ocamlbuild ];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]
|
|
++ (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 ]);
|
|
|
|
meta = with lib; {
|
|
description = "A static type checker for JavaScript";
|
|
homepage = "https://flow.org/";
|
|
changelog = "https://github.com/facebook/flow/raw/v${version}/Changelog.md";
|
|
license = licenses.mit;
|
|
platforms = ocamlPackages.ocaml.meta.platforms;
|
|
maintainers = with maintainers; [ marsam puffnfresh ];
|
|
};
|
|
}
|