xcode: add rcodesign verification to linux instructions

This commit is contained in:
Alexandre Esteves 2023-09-10 04:25:27 +01:00 committed by Alexandre Esteves
parent 82deee3bfb
commit 3b692c3ed0

View File

@ -3,7 +3,7 @@
let requireXcode = version: sha256: let requireXcode = version: sha256:
let let
xip = "Xcode_" + version + ".xip"; xip = "Xcode_" + version + ".xip";
# TODO(alexfmpe): Find out how to validate the .xip signature in Linux
unxip = if stdenv.buildPlatform.isDarwin unxip = if stdenv.buildPlatform.isDarwin
then '' then ''
open -W ${xip} open -W ${xip}
@ -14,7 +14,9 @@ let requireXcode = version: sha256:
rm -rf ${xip} rm -rf ${xip}
pbzx -n Content | cpio -i pbzx -n Content | cpio -i
rm Content Metadata rm Content Metadata
rcodesign verify Xcode.app/Contents/MacOS/Xcode
''; '';
app = requireFile rec { app = requireFile rec {
name = "Xcode.app"; name = "Xcode.app";
url = "https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_${version}/${xip}"; url = "https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_${version}/${xip}";
@ -83,4 +85,3 @@ in lib.makeExtensible (self: {
xcode_15_1 = requireXcode "15.1" "sha256-0djqoSamU87rCpjo50Un3cFg9wKf+pSczRko6uumGM0="; xcode_15_1 = requireXcode "15.1" "sha256-0djqoSamU87rCpjo50Un3cFg9wKf+pSczRko6uumGM0=";
xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if (stdenv.targetPlatform ? xcodeVer) then stdenv.targetPlatform.xcodeVer else "12.3")}"; xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if (stdenv.targetPlatform ? xcodeVer) then stdenv.targetPlatform.xcodeVer else "12.3")}";
}) })