about summary refs log tree commit diff
path: root/pkgs/development/libraries/v8/3.16.14.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/v8/3.16.14.nix')
-rw-r--r--pkgs/development/libraries/v8/3.16.14.nix14
1 files changed, 8 insertions, 6 deletions
diff --git a/pkgs/development/libraries/v8/3.16.14.nix b/pkgs/development/libraries/v8/3.16.14.nix
index 91a8763d43f9..73f5febb6685 100644
--- a/pkgs/development/libraries/v8/3.16.14.nix
+++ b/pkgs/development/libraries/v8/3.16.14.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, gyp, readline, python, which, icu, utillinux}:
+{ stdenv, lib, fetchurl, gyp, readline, python, which, icu, utillinux, cctools }:
 
 assert readline != null;
 
@@ -24,9 +24,7 @@ stdenv.mkDerivation rec {
   '';
 
   configurePhase = stdenv.lib.optionalString stdenv.isDarwin ''
-    ln -s /usr/bin/xcodebuild $TMPDIR
-    ln -s /usr/bin/libtool $TMPDIR
-    export PATH=$TMPDIR:$PATH
+    export GYP_DEFINES="mac_deployment_target=$MACOSX_DEPLOYMENT_TARGET"
   '' + ''
     PYTHONPATH="tools/generate_shim_headers:$PYTHONPATH" \
       ${gyp}/bin/gyp \
@@ -41,12 +39,16 @@ stdenv.mkDerivation rec {
         ${lib.optionalString armHardFloat "-Dv8_use_arm_eabi_hardfloat=true"} \
         --depth=. -Ibuild/standalone.gypi \
         build/all.gyp
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    sed -i 's@/usr/bin/env python@${python}/bin/python@g' out/gyp-mac-tool
   '';
 
   nativeBuildInputs = [ which ];
-  buildInputs = [ readline python icu ] ++ lib.optional stdenv.isLinux utillinux;
+  buildInputs = [ readline python icu ]
+                  ++ lib.optional stdenv.isLinux utillinux
+                  ++ lib.optional stdenv.isDarwin cctools;
 
-  NIX_CFLAGS_COMPILE = "-Wno-error";
+  NIX_CFLAGS_COMPILE = "-Wno-error -w";
 
   buildFlags = [
     "-C out"