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