From 470007e7e1e5c1b0bdfb86bf45b3f9d0306daf62 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Thu, 2 Oct 2014 15:49:33 +0200 Subject: [PATCH] Make path to Xcode configurable --- pkgs/development/mobile/xcodeenv/default.nix | 4 ++-- pkgs/development/mobile/xcodeenv/xcodewrapper.nix | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/mobile/xcodeenv/default.nix b/pkgs/development/mobile/xcodeenv/default.nix index ad6569d94783..0d221a8952bd 100644 --- a/pkgs/development/mobile/xcodeenv/default.nix +++ b/pkgs/development/mobile/xcodeenv/default.nix @@ -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 { diff --git a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix index fd375d6213c6..4545ea8dae15 100644 --- a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix +++ b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix @@ -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}')" ]