mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 18:26:45 +01:00
26 lines
791 B
Nix
26 lines
791 B
Nix
{stdenv, version ? "5.0"}:
|
|
|
|
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
|
|
ln -s /usr/bin/codesign
|
|
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
|
|
echo "We require xcodebuild version: ${version}"
|
|
exit 1
|
|
fi
|
|
'';
|
|
}
|