guix: Let XCODE_SOURCE be specified via env

This commit is contained in:
UdjinM6 2024-11-12 16:16:20 +03:00
parent 74489dc82d
commit 07f056a377
No known key found for this signature in database
GPG Key ID: 83592BD1400D58D9

View File

@ -12,6 +12,7 @@ fi
XCODE_VERSION="12.2"
XCODE_RELEASE="12B45b"
XCODE_ARCHIVE="Xcode-${XCODE_VERSION}-${XCODE_RELEASE}-extracted-SDK-with-libcxx-headers"
XCODE_SOURCE="${XCODE_SOURCE:-https://bitcoincore.org/depends-sources/sdks}"
export SDK_PATH="${SDK_PATH:-${WORKSPACE_PATH}/depends/SDKs}"
@ -19,7 +20,7 @@ export SDK_PATH="${SDK_PATH:-${WORKSPACE_PATH}/depends/SDKs}"
if [[ ! -d "${SDK_PATH}/${XCODE_ARCHIVE}" ]]; then
echo "Preparing macOS SDK..."
mkdir -p "${SDK_PATH}"
curl -L https://bitcoincore.org/depends-sources/sdks/${XCODE_ARCHIVE}.tar.gz | tar -xz -C "${SDK_PATH}"
curl -L "${XCODE_SOURCE}/${XCODE_ARCHIVE}.tar.gz" | tar -xz -C "${SDK_PATH}"
fi
# Add safe.directory option only when WORKSPACE_PATH was specified via cmd-line arguments (happens in CI)