at v192 25 lines 812 B view raw
1{stdenv, version, xcodeBaseDir}: 2 3stdenv.mkDerivation { 4 name = "xcode-wrapper-"+version; 5 buildCommand = '' 6 mkdir -p $out/bin 7 cd $out/bin 8 ln -s /usr/bin/xcode-select 9 ln -s /usr/bin/security 10 ln -s /usr/bin/codesign 11 ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild" 12 ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcrun" 13 ln -s "${xcodeBaseDir}/Contents/Developer/Applications/iOS Simulator.app/Contents/MacOS/iOS Simulator" 14 15 cd .. 16 ln -s "${xcodeBaseDir}/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs" 17 18 # Check if we have the xcodebuild version that we want 19 if [ -z "$($out/bin/xcodebuild -version | grep -x 'Xcode ${version}')" ] 20 then 21 echo "We require xcodebuild version: ${version}" 22 exit 1 23 fi 24 ''; 25}