2013-10-15 15:32:38 +01:00
|
|
|
{stdenv, version ? "5.0"}:
|
2013-01-07 15:52:42 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "xcode-wrapper-"+version;
|
|
|
|
buildCommand = ''
|
|
|
|
ensureDir $out/bin
|
|
|
|
cd $out/bin
|
|
|
|
ln -s /usr/bin/xcode-select
|
|
|
|
ln -s /usr/bin/xcodebuild
|
|
|
|
ln -s /usr/bin/xcrun
|
|
|
|
ln -s /usr/bin/security
|
2013-10-15 15:32:38 +01:00
|
|
|
ln -s /usr/bin/codesign
|
2013-01-07 15:52:42 +00:00
|
|
|
ln -s "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator"
|
|
|
|
|
2013-08-16 12:20:59 +01:00
|
|
|
cd ..
|
|
|
|
ln -s "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs"
|
|
|
|
|
2013-01-07 15:52:42 +00:00
|
|
|
# Check if we have the xcodebuild version that we want
|
|
|
|
if [ -z "$($out/bin/xcodebuild -version | grep ${version})" ]
|
|
|
|
then
|
|
|
|
echo "We require xcodebuild version: ${version}"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
}
|