Make path to Xcode configurable

This commit is contained in:
Sander van der Burg 2014-10-02 15:49:33 +02:00
parent f9347cfbb0
commit 470007e7e1
2 changed files with 7 additions and 7 deletions

View File

@ -1,8 +1,8 @@
{stdenv, version ? "5.0"}:
{stdenv, version ? "5.0", xcodeBaseDir ? "/Applications/Xcode.app"}:
rec {
xcodewrapper = import ./xcodewrapper.nix {
inherit stdenv version;
inherit stdenv version xcodeBaseDir;
};
buildApp = import ./build-app.nix {

View File

@ -1,4 +1,4 @@
{stdenv, version}:
{stdenv, version, xcodeBaseDir}:
stdenv.mkDerivation {
name = "xcode-wrapper-"+version;
@ -6,14 +6,14 @@ stdenv.mkDerivation {
mkdir -p $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"
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcrun"
ln -s "${xcodeBaseDir}/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"
ln -s "${xcodeBaseDir}/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs"
# Check if we have the xcodebuild version that we want
if [ -z "$($out/bin/xcodebuild -version | grep -x 'Xcode ${version}')" ]