nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at fix-function-merge 41 lines 1.3 kB view raw
1{ lib, stdenv, fetchFromGitHub, ocamlPackages, CoreServices }: 2 3stdenv.mkDerivation rec { 4 pname = "flow"; 5 version = "0.238.3"; 6 7 src = fetchFromGitHub { 8 owner = "facebook"; 9 repo = "flow"; 10 rev = "v${version}"; 11 hash = "sha256-WlHta/wXTULehopXeIUdNAQb12Lf0SJnm1HIVHTDshA="; 12 }; 13 14 postPatch = '' 15 substituteInPlace src/services/inference/check_cache.ml --replace 'Core_kernel' 'Core' 16 ''; 17 18 makeFlags = [ "FLOW_RELEASE=1" ]; 19 20 installPhase = '' 21 install -Dm755 bin/flow $out/bin/flow 22 install -Dm644 resources/shell/bash-completion $out/share/bash-completion/completions/flow 23 ''; 24 25 strictDeps = true; 26 27 nativeBuildInputs = with ocamlPackages; [ ocaml dune_3 findlib ocamlbuild ]; 28 29 buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ] 30 ++ (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 ]); 31 32 meta = with lib; { 33 description = "Static type checker for JavaScript"; 34 mainProgram = "flow"; 35 homepage = "https://flow.org/"; 36 changelog = "https://github.com/facebook/flow/blob/v${version}/Changelog.md"; 37 license = licenses.mit; 38 platforms = ocamlPackages.ocaml.meta.platforms; 39 maintainers = with maintainers; [ puffnfresh ]; 40 }; 41}