2014-10-02 13:49:33 +00:00
|
|
|
{stdenv, version, xcodeBaseDir}:
|
2013-01-07 15:52:42 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "xcode-wrapper-"+version;
|
|
|
|
buildCommand = ''
|
2014-06-30 12:56:10 +00:00
|
|
|
mkdir -p $out/bin
|
2013-01-07 15:52:42 +00:00
|
|
|
cd $out/bin
|
|
|
|
ln -s /usr/bin/xcode-select
|
|
|
|
ln -s /usr/bin/security
|
2013-10-15 14:32:38 +00:00
|
|
|
ln -s /usr/bin/codesign
|
2014-10-02 13:49:33 +00:00
|
|
|
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"
|
|
|
|
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcrun"
|
2014-10-15 15:10:35 +00:00
|
|
|
ln -s "${xcodeBaseDir}/Contents/Developer/Applications/iOS Simulator.app/Contents/MacOS/iOS Simulator"
|
2013-01-07 15:52:42 +00:00
|
|
|
|
2013-08-16 11:20:59 +00:00
|
|
|
cd ..
|
2014-10-02 13:49:33 +00:00
|
|
|
ln -s "${xcodeBaseDir}/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs"
|
2013-08-16 11:20:59 +00:00
|
|
|
|
2013-01-07 15:52:42 +00:00
|
|
|
# Check if we have the xcodebuild version that we want
|
2013-12-24 13:34:56 +00:00
|
|
|
if [ -z "$($out/bin/xcodebuild -version | grep -x 'Xcode ${version}')" ]
|
2013-01-07 15:52:42 +00:00
|
|
|
then
|
|
|
|
echo "We require xcodebuild version: ${version}"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
}
|