From 67c4c5fd16d8b9f0a62078a5cf131c7048ed04da Mon Sep 17 00:00:00 2001
From: Matthijs Steen <emailmatthijs@gmail.com>
Date: Tue, 10 Nov 2015 16:17:00 +0100
Subject: [PATCH] flow: added Linux support

Changed the build inputs to only include the additional Darwin inputs when building for Darwin.
---
 pkgs/development/tools/analysis/flow/default.nix | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/pkgs/development/tools/analysis/flow/default.nix b/pkgs/development/tools/analysis/flow/default.nix
index c049a57e76e7..3dcc9a87572e 100644
--- a/pkgs/development/tools/analysis/flow/default.nix
+++ b/pkgs/development/tools/analysis/flow/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchFromGitHub, ocaml, libelf, cf-private, CoreServices }:
+{ stdenv, fetchFromGitHub, lib, ocaml, libelf, cf-private, CoreServices }:
+
+with lib;
 
 stdenv.mkDerivation rec {
   version = "0.17.0";
@@ -15,13 +17,14 @@ stdenv.mkDerivation rec {
     cp bin/flow $out/bin/
   '';
 
-  buildInputs = [ ocaml libelf cf-private CoreServices ];
+  buildInputs = [ ocaml libelf ]
+    ++ optionals stdenv.isDarwin [ cf-private CoreServices ];
 
   meta = with stdenv.lib; {
-    homepage = "http://flowtype.org/";
     description = "A static type checker for JavaScript";
-    license = stdenv.lib.licenses.bsd3;
-    platforms = stdenv.lib.platforms.unix;
+    homepage = http://flowtype.org;
+    license = licenses.bsd3;
+    platforms = platforms.unix;
     maintainers = with maintainers; [ puffnfresh globin ];
   };
 }