Moved reference to iPhone SDKs to the wrapper that proxies to Xcode

This commit is contained in:
Sander van der Burg 2013-08-16 13:20:59 +02:00
parent 5cb688eb52
commit bf1c37494e
2 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,6 @@
{stdenv, xcodewrapper}:
{ name, appName ? null, app
, device ? "iPhone", baseDir ? ""
, sdkRoot ? "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs"
, sdkVersion ? "6.1"
}:
@ -16,7 +15,7 @@ stdenv.mkDerivation {
#! ${stdenv.shell} -e
cd "${app}/${baseDir}/${_appName}.app"
"$(readlink "${xcodewrapper}/bin/iPhone Simulator")" -SimulateApplication './${_appName}' -SimulateDevice '${device}' -currentSDKRoot '${sdkRoot}/iPhoneSimulator${sdkVersion}.sdk'
"$(readlink "${xcodewrapper}/bin/iPhone Simulator")" -SimulateApplication './${_appName}' -SimulateDevice '${device}' -currentSDKRoot "$(readlink "${xcodewrapper}/SDKs")/iPhoneSimulator${sdkVersion}.sdk"
EOF
chmod +x $out/bin/run-test-simulator
'';

View File

@ -11,6 +11,9 @@ stdenv.mkDerivation {
ln -s /usr/bin/security
ln -s "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator"
cd ..
ln -s "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs"
# Check if we have the xcodebuild version that we want
if [ -z "$($out/bin/xcodebuild -version | grep ${version})" ]
then