lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

nodejs: patch away absolute paths from GYP script (#439433)

+67
+63
pkgs/development/web/nodejs/gyp-patches-set-fallback-value-for-CLT-darwin.patch
··· 1 + Sandboxed builds need a fallback value for the version of the Command Line Tools 2 + being used. 3 + 4 + diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py 5 + index 508f6ccac3e..44bcd988c4c 100644 6 + --- a/tools/gyp/pylib/gyp/xcode_emulation.py 7 + +++ b/tools/gyp/pylib/gyp/xcode_emulation.py 8 + @@ -1495,24 +1495,8 @@ def XcodeVersion(): 9 + global XCODE_VERSION_CACHE 10 + if XCODE_VERSION_CACHE: 11 + return XCODE_VERSION_CACHE 12 + - version = "" 13 + + version = "11.0.0.0.1.1567737322" 14 + build = "" 15 + - try: 16 + - version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines() 17 + - # In some circumstances xcodebuild exits 0 but doesn't return 18 + - # the right results; for example, a user on 10.7 or 10.8 with 19 + - # a bogus path set via xcode-select 20 + - # In that case this may be a CLT-only install so fall back to 21 + - # checking that version. 22 + - if len(version_list) < 2: 23 + - raise GypError("xcodebuild returned unexpected results") 24 + - version = version_list[0].split()[-1] # Last word on first line 25 + - build = version_list[-1].split()[-1] # Last word on last line 26 + - except (GypError, OSError): 27 + - # Xcode not installed so look for XCode Command Line Tools 28 + - version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322 29 + - if not version: 30 + - raise GypError("No Xcode or CLT version detected!") 31 + # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100": 32 + version = version.split(".")[:3] # Just major, minor, micro 33 + version[0] = version[0].zfill(2) # Add a leading zero if major is one digit 34 + 35 + 36 + --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py 37 + +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py 38 + @@ -1495,24 +1495,8 @@ def XcodeVersion(): 39 + global XCODE_VERSION_CACHE 40 + if XCODE_VERSION_CACHE: 41 + return XCODE_VERSION_CACHE 42 + - version = "" 43 + + version = "11.0.0.0.1.1567737322" 44 + build = "" 45 + - try: 46 + - version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines() 47 + - # In some circumstances xcodebuild exits 0 but doesn't return 48 + - # the right results; for example, a user on 10.7 or 10.8 with 49 + - # a bogus path set via xcode-select 50 + - # In that case this may be a CLT-only install so fall back to 51 + - # checking that version. 52 + - if len(version_list) < 2: 53 + - raise GypError("xcodebuild returned unexpected results") 54 + - version = version_list[0].split()[-1] # Last word on first line 55 + - build = version_list[-1].split()[-1] # Last word on last line 56 + - except (GypError, OSError): 57 + - # Xcode not installed so look for XCode Command Line Tools 58 + - version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322 59 + - if not version: 60 + - raise GypError("No Xcode or CLT version detected!") 61 + # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100": 62 + version = version.split(".")[:3] # Just major, minor, micro 63 + version[0] = version[0].zfill(2) # Add a leading zero if major is one digit
+4
pkgs/development/web/nodejs/gyp-patches.nix
··· 47 47 extraPrefix = "deps/npm/node_modules/node-gyp/gyp/"; 48 48 }) 49 49 ]) 50 + # TODO: remove the Darwin conditionals from this file 51 + ++ lib.optionals stdenv.buildPlatform.isDarwin ([ 52 + ./gyp-patches-set-fallback-value-for-CLT-darwin.patch 53 + ])