about summary refs log tree commit diff
path: root/pkgs/development/web/nodejs
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-01-19 09:55:31 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-01-19 09:55:31 +0100
commit716aac2519a7571e7f5fd984a886d579a4a051c5 (patch)
tree53cf89cf764d787f4dc8f08474479892b9733177 /pkgs/development/web/nodejs
parentf8472457a440de3c44f6f604142d678b6ae2a762 (diff)
parent53b389327e34de319dc0dbda2b6bcab1a69db69d (diff)
downloadnixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.gz
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.bz2
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.lz
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.xz
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.zst
nixlib-716aac2519a7571e7f5fd984a886d579a4a051c5.zip
Merge branch 'staging' into closure-size
Diffstat (limited to 'pkgs/development/web/nodejs')
-rw-r--r--pkgs/development/web/nodejs/default-arch.patch10
-rw-r--r--pkgs/development/web/nodejs/no-xcode.patch23
-rw-r--r--pkgs/development/web/nodejs/v0_10.nix3
-rw-r--r--pkgs/development/web/nodejs/v4.nix3
4 files changed, 20 insertions, 19 deletions
diff --git a/pkgs/development/web/nodejs/default-arch.patch b/pkgs/development/web/nodejs/default-arch.patch
index 3c7eb1014dee..e6d5b5428d77 100644
--- a/pkgs/development/web/nodejs/default-arch.patch
+++ b/pkgs/development/web/nodejs/default-arch.patch
@@ -1,12 +1,12 @@
-diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
---- a/tools/gyp/pylib/gyp/xcode_emulation.py	2014-01-23 06:05:51.000000000 +0100
-+++ b/tools/gyp/pylib/gyp/xcode_emulation.py	2014-02-04 17:49:48.000000000 +0100
-@@ -1018,12 +1033,16 @@
+diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
+index 30f27d5..eb178a5 100644
+--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
++++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
+@@ -1018,12 +1018,15 @@ class XcodeSettings(object):
      # Since the value returned by this function is only used when ARCHS is not
      # set, then on iOS we return "i386", as the default xcode project generator
      # does not set ARCHS if it is not set in the .gyp file.
 -    if self.isIOS:
-+    
 +    try:
 +      if self.isIOS:
 +        return 'i386'
diff --git a/pkgs/development/web/nodejs/no-xcode.patch b/pkgs/development/web/nodejs/no-xcode.patch
index 244a55e9aebb..4754432ba4ab 100644
--- a/pkgs/development/web/nodejs/no-xcode.patch
+++ b/pkgs/development/web/nodejs/no-xcode.patch
@@ -1,7 +1,8 @@
-diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
---- a/tools/gyp/pylib/gyp/xcode_emulation.py	2014-01-23 06:05:51.000000000 +0100
-+++ b/tools/gyp/pylib/gyp/xcode_emulation.py	2014-02-04 17:49:48.000000000 +0100
-@@ -302,10 +302,17 @@
+diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
+index c002b11..eeb0400 100644
+--- a/tools/gyp/pylib/gyp/xcode_emulation.py
++++ b/tools/gyp/pylib/gyp/xcode_emulation.py
+@@ -446,10 +446,16 @@ class XcodeSettings(object):
  
    def _XcodeSdkPath(self, sdk_root):
      if sdk_root not in XcodeSettings._sdk_path_cache:
@@ -19,11 +20,10 @@ diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_
 +        # the user is probably on a CLT-only system, where there
 +        # is no valid SDK root
 +        XcodeSettings._sdk_path_cache[sdk_root] = None
-+        
      return XcodeSettings._sdk_path_cache[sdk_root]
  
    def _AppendPlatformVersionMinFlags(self, lst):
-@@ -420,10 +427,12 @@
+@@ -572,10 +578,11 @@ class XcodeSettings(object):
        framework_root = sdk_root
      else:
        framework_root = ''
@@ -31,7 +31,6 @@ diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_
 -    framework_dirs = config.get('mac_framework_dirs', [])
 -    for directory in framework_dirs:
 -      cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
-+    
 +    if 'SDKROOT' in self._Settings():
 +      config = self.spec['configurations'][self.configname]
 +      framework_dirs = config.get('mac_framework_dirs', [])
@@ -40,7 +39,7 @@ diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_
  
      self.configname = None
      return cflags
-@@ -673,10 +682,12 @@
+@@ -826,10 +833,11 @@ class XcodeSettings(object):
      sdk_root = self._SdkPath()
      if not sdk_root:
        sdk_root = ''
@@ -48,21 +47,19 @@ diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_
 -    framework_dirs = config.get('mac_framework_dirs', [])
 -    for directory in framework_dirs:
 -      ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
-+    
 +    if 'SDKROOT' in self._Settings():
 +      config = self.spec['configurations'][self.configname]
 +      framework_dirs = config.get('mac_framework_dirs', [])
 +      for directory in framework_dirs:
 +        ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
  
-     self.configname = None
-     return ldflags
-@@ -863,7 +874,11 @@
+     is_extension = self._IsIosAppExtension() or self._IsIosWatchKitExtension()
+     if sdk_root and is_extension:
+@@ -1032,7 +1040,10 @@ class XcodeSettings(object):
      sdk_root = self._SdkPath(config_name)
      if not sdk_root:
        sdk_root = ''
 -    return l.replace('$(SDKROOT)', sdk_root)
-+    
 +    if self._SdkPath():
 +      return l.replace('$(SDKROOT)', sdk_root)
 +    else:
diff --git a/pkgs/development/web/nodejs/v0_10.nix b/pkgs/development/web/nodejs/v0_10.nix
index 5d292a340783..bef89da4f8f1 100644
--- a/pkgs/development/web/nodejs/v0_10.nix
+++ b/pkgs/development/web/nodejs/v0_10.nix
@@ -40,6 +40,8 @@ in stdenv.mkDerivation {
 
   prePatch = ''
     patchShebangs .
+    sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
+    sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' tools/gyp/pylib/gyp/xcode_emulation.py
   '';
 
   patches = stdenv.lib.optionals stdenv.isDarwin [ ./default-arch.patch ./no-xcode.patch ];
@@ -60,7 +62,6 @@ in stdenv.mkDerivation {
     pushd $out/lib/node_modules/npm/node_modules/node-gyp
     patch -p2 < ${./no-xcode.patch}
     popd
-    sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' $out/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
   '';
 
   passthru.interpreterName = "nodejs-0.10";
diff --git a/pkgs/development/web/nodejs/v4.nix b/pkgs/development/web/nodejs/v4.nix
index 8ccf8976a949..f58e5e41720b 100644
--- a/pkgs/development/web/nodejs/v4.nix
+++ b/pkgs/development/web/nodejs/v4.nix
@@ -48,6 +48,9 @@ in stdenv.mkDerivation {
   nativeBuildInputs = [ pkgconfig ]
     ++ optional stdenv.isDarwin libtool;
 
+  postFixup = ''
+    sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' $out/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
+  '';
   setupHook = ./setup-hook.sh;
 
   enableParallelBuilding = true;