Skip to content

Instantly share code, notes, and snippets.

@despairblue
Created July 9, 2016 22:39
Show Gist options
  • Save despairblue/ede17776a9c4a535111fb43fe88e2e4e to your computer and use it in GitHub Desktop.
Save despairblue/ede17776a9c4a535111fb43fe88e2e4e to your computer and use it in GitHub Desktop.
{ stdenv, fetchFromGitHub, lib, ocaml, libelf, cf-private, CoreServices, git, mercurial }:
with lib;
stdenv.mkDerivation rec {
version = "0.28.0";
name = "flow-${version}";
src = fetchFromGitHub {
owner = "facebook";
repo = "flow";
rev = "v${version}";
sha256 = "1xryv1366zc385r82r6n832xkaqcm63zs1baizl02qchfzfa3am2";
};
installPhase = ''
mkdir -p $out/bin
cp bin/flow $out/bin/
'';
buildInputs = [ ocaml libelf ]
++ optionals stdenv.isDarwin [ cf-private CoreServices ];
meta = with stdenv.lib; {
description = "A static type checker for JavaScript";
homepage = http://flowtype.org;
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [ puffnfresh globin ];
};
}
@despairblue
Copy link
Author

I tried to update flow in nixos, but due to a bug it only builds if git and hg are in the path, so I added git and mercurial to the environment, but it still fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment