about summary refs log tree commit diff
path: root/pkgs/development/mobile
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2014-10-14 14:57:11 +0200
committerSander van der Burg <svanderburg@gmail.com>2014-10-14 14:57:11 +0200
commit2375a55e1e72b5a621482a19515ecff51ab12c08 (patch)
treee98927bbd4e38152976e6f87bb8d9790edee08ad /pkgs/development/mobile
parente3563e6c23f4f99ff492bb106a46871c8ee7cb61 (diff)
downloadnixlib-2375a55e1e72b5a621482a19515ecff51ab12c08.tar
nixlib-2375a55e1e72b5a621482a19515ecff51ab12c08.tar.gz
nixlib-2375a55e1e72b5a621482a19515ecff51ab12c08.tar.bz2
nixlib-2375a55e1e72b5a621482a19515ecff51ab12c08.tar.lz
nixlib-2375a55e1e72b5a621482a19515ecff51ab12c08.tar.xz
nixlib-2375a55e1e72b5a621482a19515ecff51ab12c08.tar.zst
nixlib-2375a55e1e72b5a621482a19515ecff51ab12c08.zip
titaniumenv: Make path to xcode configurable through the build function
Diffstat (limited to 'pkgs/development/mobile')
-rw-r--r--pkgs/development/mobile/titaniumenv/build-app.nix10
-rw-r--r--pkgs/development/mobile/titaniumenv/default.nix2
2 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix
index c99a19ff7749..c2c84171b2a3 100644
--- a/pkgs/development/mobile/titaniumenv/build-app.nix
+++ b/pkgs/development/mobile/titaniumenv/build-app.nix
@@ -1,4 +1,4 @@
-{stdenv, androidsdk, titaniumsdk, titanium, xcodewrapper, jdk, python, which}:
+{stdenv, androidsdk, titaniumsdk, titanium, xcodewrapper, jdk, python, which, xcodeBaseDir}:
 { name, src, target, androidPlatformVersions ? [ "8" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null
 , release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null
 , iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null
@@ -101,7 +101,10 @@ stdenv.mkDerivation {
               cat > $HOME/.titanium/auth_session.json <<EOF
               { "loggedIn": true }
               EOF
-            
+              
+              # Configure the path to Xcode
+              titanium --config-file $TMPDIR/config.json --no-colors config paths.xcode ${xcodeBaseDir}
+              
               # Set the SDK to our copy
               titanium --config-file $TMPDIR/config.json --no-colors config sdk.defaultInstallLocation $TMPDIR/titaniumsdk
             
@@ -122,6 +125,9 @@ stdenv.mkDerivation {
               cp -av * $out
               cd $out
             
+              # Configure the path to Xcode
+              titanium --config-file $TMPDIR/config.json --no-colors config paths.xcode ${xcodeBaseDir}
+              
               titanium build --config-file $TMPDIR/config.json --force --no-colors --platform ios --target simulator --build-only --device-family universal --output-dir $out
           ''}
         ''
diff --git a/pkgs/development/mobile/titaniumenv/default.nix b/pkgs/development/mobile/titaniumenv/default.nix
index 49da64e8514f..34e14b67c006 100644
--- a/pkgs/development/mobile/titaniumenv/default.nix
+++ b/pkgs/development/mobile/titaniumenv/default.nix
@@ -47,6 +47,6 @@ rec {
     inherit (pkgs.nodePackages) titanium;
     inherit (androidenv) androidsdk;
     inherit (xcodeenv) xcodewrapper;
-    inherit titaniumsdk;
+    inherit titaniumsdk xcodeBaseDir;
   };
 }