update xcode patches for node v0.10.41

+17 -19
+5 -5
pkgs/development/web/nodejs/default-arch.patch
··· 1 - diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py 2 - --- a/tools/gyp/pylib/gyp/xcode_emulation.py 2014-01-23 06:05:51.000000000 +0100 3 - +++ b/tools/gyp/pylib/gyp/xcode_emulation.py 2014-02-04 17:49:48.000000000 +0100 4 - @@ -1018,12 +1033,16 @@ 1 + 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 2 + index 30f27d5..eb178a5 100644 3 + --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py 4 + +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py 5 + @@ -1018,12 +1018,15 @@ class XcodeSettings(object): 5 6 # Since the value returned by this function is only used when ARCHS is not 6 7 # set, then on iOS we return "i386", as the default xcode project generator 7 8 # does not set ARCHS if it is not set in the .gyp file. 8 9 - if self.isIOS: 9 - + 10 10 + try: 11 11 + if self.isIOS: 12 12 + return 'i386'
+10 -13
pkgs/development/web/nodejs/no-xcode.patch
··· 1 - diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py 2 - --- a/tools/gyp/pylib/gyp/xcode_emulation.py 2014-01-23 06:05:51.000000000 +0100 3 - +++ b/tools/gyp/pylib/gyp/xcode_emulation.py 2014-02-04 17:49:48.000000000 +0100 4 - @@ -302,10 +302,17 @@ 1 + diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py 2 + index c002b11..eeb0400 100644 3 + --- a/tools/gyp/pylib/gyp/xcode_emulation.py 4 + +++ b/tools/gyp/pylib/gyp/xcode_emulation.py 5 + @@ -446,10 +446,16 @@ class XcodeSettings(object): 5 6 6 7 def _XcodeSdkPath(self, sdk_root): 7 8 if sdk_root not in XcodeSettings._sdk_path_cache: ··· 19 20 + # the user is probably on a CLT-only system, where there 20 21 + # is no valid SDK root 21 22 + XcodeSettings._sdk_path_cache[sdk_root] = None 22 - + 23 23 return XcodeSettings._sdk_path_cache[sdk_root] 24 24 25 25 def _AppendPlatformVersionMinFlags(self, lst): 26 - @@ -420,10 +427,12 @@ 26 + @@ -572,10 +578,11 @@ class XcodeSettings(object): 27 27 framework_root = sdk_root 28 28 else: 29 29 framework_root = '' ··· 31 31 - framework_dirs = config.get('mac_framework_dirs', []) 32 32 - for directory in framework_dirs: 33 33 - cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root)) 34 - + 35 34 + if 'SDKROOT' in self._Settings(): 36 35 + config = self.spec['configurations'][self.configname] 37 36 + framework_dirs = config.get('mac_framework_dirs', []) ··· 40 39 41 40 self.configname = None 42 41 return cflags 43 - @@ -673,10 +682,12 @@ 42 + @@ -826,10 +833,11 @@ class XcodeSettings(object): 44 43 sdk_root = self._SdkPath() 45 44 if not sdk_root: 46 45 sdk_root = '' ··· 48 47 - framework_dirs = config.get('mac_framework_dirs', []) 49 48 - for directory in framework_dirs: 50 49 - ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root)) 51 - + 52 50 + if 'SDKROOT' in self._Settings(): 53 51 + config = self.spec['configurations'][self.configname] 54 52 + framework_dirs = config.get('mac_framework_dirs', []) 55 53 + for directory in framework_dirs: 56 54 + ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root)) 57 55 58 - self.configname = None 59 - return ldflags 60 - @@ -863,7 +874,11 @@ 56 + is_extension = self._IsIosAppExtension() or self._IsIosWatchKitExtension() 57 + if sdk_root and is_extension: 58 + @@ -1032,7 +1040,10 @@ class XcodeSettings(object): 61 59 sdk_root = self._SdkPath(config_name) 62 60 if not sdk_root: 63 61 sdk_root = '' 64 62 - return l.replace('$(SDKROOT)', sdk_root) 65 - + 66 63 + if self._SdkPath(): 67 64 + return l.replace('$(SDKROOT)', sdk_root) 68 65 + else:
+2 -1
pkgs/development/web/nodejs/v0_10.nix
··· 40 40 41 41 prePatch = '' 42 42 patchShebangs . 43 + 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 44 + sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' tools/gyp/pylib/gyp/xcode_emulation.py 43 45 ''; 44 46 45 47 patches = stdenv.lib.optionals stdenv.isDarwin [ ./default-arch.patch ./no-xcode.patch ]; ··· 60 62 pushd $out/lib/node_modules/npm/node_modules/node-gyp 61 63 patch -p2 < ${./no-xcode.patch} 62 64 popd 63 - 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 64 65 ''; 65 66 66 67 passthru.interpreterName = "nodejs-0.10";