Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

v8: remove xcodebuild patch

Add xcodebuild commands from xcbuild.

+3 -74
+3 -9
pkgs/development/libraries/v8/default.nix
··· 1 1 { stdenv, lib, fetchgit, fetchFromGitHub, gyp, readline, python, which, icu 2 - , patchelf, coreutils, cctools 2 + , patchelf, coreutils, xcbuild 3 3 , doCheck ? false 4 4 , static ? false 5 5 }: ··· 124 124 125 125 # Patch based off of: 126 126 # https://github.com/cowboyd/libv8/tree/v5.1.281.67.0/patches 127 - patches = lib.optional (!doCheck) ./libv8-5.4.232.patch 128 - ++ stdenv.lib.optionals stdenv.isDarwin [ ./no-xcode.patch ]; 129 - 130 - prePatch = '' 131 - chmod +w tools/gyp/pylib/gyp 132 - chmod +w tools/gyp/pylib/gyp/xcode_emulation.py 133 - ''; 127 + patches = lib.optional (!doCheck) ./libv8-5.4.232.patch; 134 128 135 129 postPatch = '' 136 130 sed -i 's,#!/usr/bin/env python,#!${python}/bin/python,' gypfiles/gyp_v8 ··· 157 151 158 152 nativeBuildInputs = [ which ]; 159 153 buildInputs = [ readline python icu ] 160 - ++ stdenv.lib.optional stdenv.isDarwin cctools 154 + ++ stdenv.lib.optional stdenv.isDarwin xcbuild 161 155 ++ stdenv.lib.optional stdenv.isLinux patchelf; 162 156 163 157 NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow -Wno-error=unused-function -Wno-error=attributes"
-64
pkgs/development/libraries/v8/no-xcode.patch
··· 1 - --- a/tools/gyp/pylib/gyp/xcode_emulation.py 2 - +++ a/tools/gyp/pylib/gyp/xcode_emulation.py 3 - @@ -473,10 +473,16 @@ 4 - 5 - def _XcodeSdkPath(self, sdk_root): 6 - if sdk_root not in XcodeSettings._sdk_path_cache: 7 - - sdk_path = self._GetSdkVersionInfoItem(sdk_root, '--show-sdk-path') 8 - - XcodeSettings._sdk_path_cache[sdk_root] = sdk_path 9 - - if sdk_root: 10 - - XcodeSettings._sdk_root_cache[sdk_path] = sdk_root 11 - + try: 12 - + sdk_path = self._GetSdkVersionInfoItem(sdk_root, '--show-sdk-path') 13 - + XcodeSettings._sdk_path_cache[sdk_root] = sdk_path 14 - + if sdk_root: 15 - + XcodeSettings._sdk_root_cache[sdk_path] = sdk_root 16 - + except: 17 - + # if this fails it's because xcodebuild failed, which means 18 - + # the user is probably on a CLT-only system, where there 19 - + # is no valid SDK root 20 - + XcodeSettings._sdk_path_cache[sdk_root] = None 21 - return XcodeSettings._sdk_path_cache[sdk_root] 22 - 23 - def _AppendPlatformVersionMinFlags(self, lst): 24 - @@ -606,10 +612,11 @@ 25 - framework_root = sdk_root 26 - else: 27 - framework_root = '' 28 - - config = self.spec['configurations'][self.configname] 29 - - framework_dirs = config.get('mac_framework_dirs', []) 30 - - for directory in framework_dirs: 31 - - cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root)) 32 - + if 'SDKROOT' in self._Settings(): 33 - + config = self.spec['configurations'][self.configname] 34 - + framework_dirs = config.get('mac_framework_dirs', []) 35 - + for directory in framework_dirs: 36 - + cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root)) 37 - 38 - self.configname = None 39 - return cflags 40 - @@ -861,10 +868,11 @@ 41 - sdk_root = self._SdkPath() 42 - if not sdk_root: 43 - sdk_root = '' 44 - - config = self.spec['configurations'][self.configname] 45 - - framework_dirs = config.get('mac_framework_dirs', []) 46 - - for directory in framework_dirs: 47 - - ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root)) 48 - + if 'SDKROOT' in self._Settings(): 49 - + config = self.spec['configurations'][self.configname] 50 - + framework_dirs = config.get('mac_framework_dirs', []) 51 - + for directory in framework_dirs: 52 - + ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root)) 53 - 54 - platform_root = self._XcodePlatformPath(configname) 55 - if sdk_root and platform_root and self._IsXCTest(): 56 - @@ -1358,7 +1366,7 @@ 57 - if version: 58 - version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0] 59 - else: 60 - - raise GypError("No Xcode or CLT version detected!") 61 - + version = "7.0.0" 62 - # The CLT has no build information, so we return an empty string. 63 - version_list = [version, ''] 64 - version = version_list[0]
-1
pkgs/top-level/all-packages.nix
··· 12180 12180 12181 12181 v8 = callPackage ../development/libraries/v8 ({ 12182 12182 inherit (python2Packages) python gyp; 12183 - cctools = darwin.cctools; 12184 12183 icu = icu58; # v8-5.4.232 fails against icu4c-59.1 12185 12184 } // lib.optionalAttrs stdenv.isLinux { 12186 12185 # doesn't build with gcc7