mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 01:23:03 +00:00
8339ce0e0f
Diff: https://github.com/facebook/flow/compare/v0.222.0...v0.223.2 Changelog: https://github.com/facebook/flow/blob/v0.223.2/Changelog.md
46 lines
1.4 KiB
Nix
46 lines
1.4 KiB
Nix
{ lib, stdenv, fetchFromGitHub, ocamlPackages, CoreServices }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "flow";
|
|
version = "0.223.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "facebook";
|
|
repo = "flow";
|
|
rev = "v${version}";
|
|
hash = "sha256-vjsqQuQxTywSx4c0lnDKrrNr5hfFog9UurhIctq14f4=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/services/inference/check_cache.ml --replace 'Core_kernel' 'Core'
|
|
'';
|
|
|
|
makeFlags = [ "FLOW_RELEASE=1" ];
|
|
|
|
# Work around https://github.com/NixOS/nixpkgs/issues/166205.
|
|
env = lib.optionalAttrs stdenv.cc.isClang {
|
|
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
|
|
};
|
|
|
|
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/blob/v${version}/Changelog.md";
|
|
license = licenses.mit;
|
|
platforms = ocamlPackages.ocaml.meta.platforms;
|
|
maintainers = with maintainers; [ marsam puffnfresh ];
|
|
};
|
|
}
|