at master 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 ocamlPackages, 6}: 7 8stdenv.mkDerivation rec { 9 pname = "flow"; 10 version = "0.281.0"; 11 12 src = fetchFromGitHub { 13 owner = "facebook"; 14 repo = "flow"; 15 tag = "v${version}"; 16 hash = "sha256-YttdOu5zJo/I0e2hV5vrBSWvUMOZgfhf3RmEC8fRWlI="; 17 }; 18 19 makeFlags = [ "FLOW_RELEASE=1" ]; 20 21 installPhase = '' 22 install -Dm755 bin/flow $out/bin/flow 23 install -Dm644 resources/shell/bash-completion $out/share/bash-completion/completions/flow 24 ''; 25 26 strictDeps = true; 27 28 nativeBuildInputs = with ocamlPackages; [ 29 ocaml 30 dune_3 31 findlib 32 ocamlbuild 33 ]; 34 35 buildInputs = ( 36 with ocamlPackages; 37 [ 38 camlp-streams 39 dtoa 40 fileutils 41 lwt_log 42 lwt_ppx 43 lwt 44 ppx_deriving 45 ppx_gen_rec 46 ppx_let 47 sedlex 48 visitors 49 wtf8 50 ] 51 ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify ] 52 ); 53 54 meta = with lib; { 55 description = "Static type checker for JavaScript"; 56 mainProgram = "flow"; 57 homepage = "https://flow.org/"; 58 changelog = "https://github.com/facebook/flow/blob/v${version}/Changelog.md"; 59 license = licenses.mit; 60 platforms = ocamlPackages.ocaml.meta.platforms; 61 maintainers = with maintainers; [ puffnfresh ]; 62 }; 63}