···11+Sandboxed builds need a fallback value for the version of the Command Line Tools
22+being used.
33+44+diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
55+index 508f6ccac3e..44bcd988c4c 100644
66+--- a/tools/gyp/pylib/gyp/xcode_emulation.py
77++++ b/tools/gyp/pylib/gyp/xcode_emulation.py
88+@@ -1495,24 +1495,8 @@ def XcodeVersion():
99+ global XCODE_VERSION_CACHE
1010+ if XCODE_VERSION_CACHE:
1111+ return XCODE_VERSION_CACHE
1212+- version = ""
1313++ version = "11.0.0.0.1.1567737322"
1414+ build = ""
1515+- try:
1616+- version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
1717+- # In some circumstances xcodebuild exits 0 but doesn't return
1818+- # the right results; for example, a user on 10.7 or 10.8 with
1919+- # a bogus path set via xcode-select
2020+- # In that case this may be a CLT-only install so fall back to
2121+- # checking that version.
2222+- if len(version_list) < 2:
2323+- raise GypError("xcodebuild returned unexpected results")
2424+- version = version_list[0].split()[-1] # Last word on first line
2525+- build = version_list[-1].split()[-1] # Last word on last line
2626+- except (GypError, OSError):
2727+- # Xcode not installed so look for XCode Command Line Tools
2828+- version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
2929+- if not version:
3030+- raise GypError("No Xcode or CLT version detected!")
3131+ # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100":
3232+ version = version.split(".")[:3] # Just major, minor, micro
3333+ version[0] = version[0].zfill(2) # Add a leading zero if major is one digit
3434+3535+3636+--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
3737++++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
3838+@@ -1495,24 +1495,8 @@ def XcodeVersion():
3939+ global XCODE_VERSION_CACHE
4040+ if XCODE_VERSION_CACHE:
4141+ return XCODE_VERSION_CACHE
4242+- version = ""
4343++ version = "11.0.0.0.1.1567737322"
4444+ build = ""
4545+- try:
4646+- version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
4747+- # In some circumstances xcodebuild exits 0 but doesn't return
4848+- # the right results; for example, a user on 10.7 or 10.8 with
4949+- # a bogus path set via xcode-select
5050+- # In that case this may be a CLT-only install so fall back to
5151+- # checking that version.
5252+- if len(version_list) < 2:
5353+- raise GypError("xcodebuild returned unexpected results")
5454+- version = version_list[0].split()[-1] # Last word on first line
5555+- build = version_list[-1].split()[-1] # Last word on last line
5656+- except (GypError, OSError):
5757+- # Xcode not installed so look for XCode Command Line Tools
5858+- version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
5959+- if not version:
6060+- raise GypError("No Xcode or CLT version detected!")
6161+ # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100":
6262+ version = version.split(".")[:3] # Just major, minor, micro
6363+ version[0] = version[0].zfill(2) # Add a leading zero if major is one digit
+4
pkgs/development/web/nodejs/gyp-patches.nix
···4747 extraPrefix = "deps/npm/node_modules/node-gyp/gyp/";
4848 })
4949])
5050+# TODO: remove the Darwin conditionals from this file
5151+++ lib.optionals stdenv.buildPlatform.isDarwin ([
5252+ ./gyp-patches-set-fallback-value-for-CLT-darwin.patch
5353+])