nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub, ocamlPackages, CoreServices }:
2
3stdenv.mkDerivation rec {
4 pname = "flow";
5 version = "0.163.0";
6
7 src = fetchFromGitHub {
8 owner = "facebook";
9 repo = "flow";
10 rev = "v${version}";
11 sha256 = "sha256-8O7EuYMNEa0M3HS0U10VbkevxL/cnySXHkT1WdI4Z84=";
12 };
13
14 installPhase = ''
15 install -Dm755 bin/flow $out/bin/flow
16 install -Dm644 resources/shell/bash-completion $out/share/bash-completion/completions/flow
17 '';
18
19 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 visitors wtf8 ])
20 ++ lib.optionals stdenv.isDarwin [ CoreServices ];
21
22 meta = with lib; {
23 description = "A static type checker for JavaScript";
24 homepage = "https://flow.org/";
25 changelog = "https://github.com/facebook/flow/raw/v${version}/Changelog.md";
26 license = licenses.mit;
27 platforms = ocamlPackages.ocaml.meta.platforms;
28 maintainers = with maintainers; [ marsam puffnfresh ];
29 };
30}