summaryrefslogtreecommitdiffstats
path: root/pkgs/development/mobile/xcodeenv
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@mgail.com>2014-10-02 15:49:33 +0200
committerSander van der Burg <svanderburg@mgail.com>2014-10-02 15:49:33 +0200
commit470007e7e1e5c1b0bdfb86bf45b3f9d0306daf62 (patch)
tree2ed2d0f56cbf3b15c62e7dd76cedc5d8504f5d12 /pkgs/development/mobile/xcodeenv
parentf9347cfbb04a5574e57af1eff17780912c36eca3 (diff)
Make path to Xcode configurable
Diffstat (limited to 'pkgs/development/mobile/xcodeenv')
-rw-r--r--pkgs/development/mobile/xcodeenv/default.nix4
-rw-r--r--pkgs/development/mobile/xcodeenv/xcodewrapper.nix10
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}')" ]