diff --git a/pkgs/development/web/nodejs/no-xcode-v7.patch b/pkgs/development/web/nodejs/no-xcode-v7.patch new file mode 100644 index 000000000000..05623b21f13f --- /dev/null +++ b/pkgs/development/web/nodejs/no-xcode-v7.patch @@ -0,0 +1,79 @@ +diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py +index a173ff0..1fc821a 100644 +--- a/tools/gyp/pylib/gyp/xcode_emulation.py ++++ b/tools/gyp/pylib/gyp/xcode_emulation.py +@@ -507,9 +507,12 @@ class XcodeSettings(object): + def _XcodePlatformPath(self, configname=None): + sdk_root = self._SdkRoot(configname) + if sdk_root not in XcodeSettings._platform_path_cache: +- platform_path = self._GetSdkVersionInfoItem(sdk_root, ++ try: ++ platform_path = self._GetSdkVersionInfoItem(sdk_root, + '--show-sdk-platform-path') +- XcodeSettings._platform_path_cache[sdk_root] = platform_path ++ XcodeSettings._platform_path_cache[sdk_root] = platform_path ++ except: ++ XcodeSettings._platform_path_cache[sdk_root] = None + return XcodeSettings._platform_path_cache[sdk_root] + + def _SdkPath(self, configname=None): +@@ -520,10 +523,13 @@ class XcodeSettings(object): + + def _XcodeSdkPath(self, sdk_root): + if sdk_root not in XcodeSettings._sdk_path_cache: +- sdk_path = self._GetSdkVersionInfoItem(sdk_root, '--show-sdk-path') +- XcodeSettings._sdk_path_cache[sdk_root] = sdk_path +- if sdk_root: +- XcodeSettings._sdk_root_cache[sdk_path] = sdk_root ++ try: ++ sdk_path = self._GetSdkVersionInfoItem(sdk_root, '--show-sdk-path') ++ XcodeSettings._sdk_path_cache[sdk_root] = sdk_path ++ if sdk_root: ++ XcodeSettings._sdk_root_cache[sdk_path] = sdk_root ++ except: ++ XcodeSettings._sdk_path_cache[sdk_root] = None + return XcodeSettings._sdk_path_cache[sdk_root] + + def _AppendPlatformVersionMinFlags(self, lst): +@@ -653,10 +659,11 @@ class XcodeSettings(object): + framework_root = sdk_root + else: + framework_root = '' +- config = self.spec['configurations'][self.configname] +- 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', []) ++ for directory in framework_dirs: ++ cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root)) + + self.configname = None + return cflags +@@ -908,10 +915,11 @@ class XcodeSettings(object): + sdk_root = self._SdkPath() + if not sdk_root: + sdk_root = '' +- 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)) ++ 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)) + + platform_root = self._XcodePlatformPath(configname) + if sdk_root and platform_root and self._IsXCTest(): +@@ -1683,6 +1691,9 @@ def _NormalizeEnvVarReferences(str): + """Takes a string containing variable references in the form ${FOO}, $(FOO), + or $FOO, and returns a string with all variable references in the form ${FOO}. + """ ++ if str is None: ++ return '' ++ + # $FOO -> ${FOO} + str = re.sub(r'\$([a-zA-Z_][a-zA-Z0-9_]*)', r'${\1}', str) + diff --git a/pkgs/development/web/nodejs/v7.nix b/pkgs/development/web/nodejs/v7.nix index 2fb61fca0ff7..1c074fa47510 100644 --- a/pkgs/development/web/nodejs/v7.nix +++ b/pkgs/development/web/nodejs/v7.nix @@ -10,12 +10,13 @@ let baseName = if enableNpm then "nodejs" else "nodejs-slim"; in stdenv.mkDerivation (nodejs // rec { - version = "7.9.0"; + version = "7.10.0"; name = "${baseName}-${version}"; src = fetchurl { url = "https://nodejs.org/download/release/v${version}/node-v${version}.tar.xz"; - sha256 = "0abaz5z0cv7amd6blm4cm91asj30ydf0lq3j0wdg6aa9i15pcsd5"; + sha256 = "08czj7ssvzgv13zvhg2y9mhy4cc6pvm4bcp7rbzj3a2ba8axsd6w"; }; + patches = stdenv.lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ]; })