about summary refs log tree commit diff
path: root/pkgs/development/mobile
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-22 11:00:00 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-22 11:00:00 +0200
commit7f410ef923b5959147e3902f727bb91b08543f72 (patch)
tree5081fe1dbc7731c179ac8ab945e9ae2d9caefcfd /pkgs/development/mobile
parentf77abc8b7a8b4279258862a7b6d3810e73d4b092 (diff)
parent7491fccfe65e204ecbc7addc7ccac7b6b69fe3c5 (diff)
downloadnixlib-7f410ef923b5959147e3902f727bb91b08543f72.tar
nixlib-7f410ef923b5959147e3902f727bb91b08543f72.tar.gz
nixlib-7f410ef923b5959147e3902f727bb91b08543f72.tar.bz2
nixlib-7f410ef923b5959147e3902f727bb91b08543f72.tar.lz
nixlib-7f410ef923b5959147e3902f727bb91b08543f72.tar.xz
nixlib-7f410ef923b5959147e3902f727bb91b08543f72.tar.zst
nixlib-7f410ef923b5959147e3902f727bb91b08543f72.zip
Merge remote-tracking branch 'origin/master' into staging
Conflicts:
	pkgs/misc/vim-plugins/default.nix
Diffstat (limited to 'pkgs/development/mobile')
-rw-r--r--pkgs/development/mobile/titaniumenv/build-app.nix4
-rw-r--r--pkgs/development/mobile/titaniumenv/default.nix5
-rw-r--r--pkgs/development/mobile/titaniumenv/examples/default.nix2
-rw-r--r--pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix6
-rw-r--r--pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix13
-rw-r--r--pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix77
-rw-r--r--pkgs/development/mobile/xcodeenv/build-app.nix2
7 files changed, 93 insertions, 16 deletions
diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix
index 1e32cce9c722..2443bfe9aed8 100644
--- a/pkgs/development/mobile/titaniumenv/build-app.nix
+++ b/pkgs/development/mobile/titaniumenv/build-app.nix
@@ -50,7 +50,7 @@ stdenv.mkDerivation {
           ${if release then
             ''titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target dist-playstore --keystore ${androidKeyStore} --alias ${androidKeyAlias} --password ${androidKeyStorePassword} --output-dir $out''
           else
-            ''titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target emulator --build-only --output $out''}
+            ''titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target emulator --build-only -B foo --output $out''}
         ''
       else if target == "iphone" then
         ''
@@ -67,7 +67,7 @@ stdenv.mkDerivation {
               security unlock-keychain -p "" $keychainName
               security import ${iosCertificate} -k $keychainName -P "${iosCertificatePassword}" -A
 
-              provisioningId=$(grep UUID -A1 -a ${iosMobileProvisioningProfile} | grep -o "[-A-Z0-9]\{36\}")
+              provisioningId=$(grep UUID -A1 -a ${iosMobileProvisioningProfile} | grep -o "[-A-Za-z0-9]\{36\}")
    
               # Ensure that the requested provisioning profile can be found
         
diff --git a/pkgs/development/mobile/titaniumenv/default.nix b/pkgs/development/mobile/titaniumenv/default.nix
index 18b76bc3bbdf..6c71116b5e81 100644
--- a/pkgs/development/mobile/titaniumenv/default.nix
+++ b/pkgs/development/mobile/titaniumenv/default.nix
@@ -1,4 +1,4 @@
-{pkgs, pkgs_i686, xcodeVersion ? "5.0", tiVersion ? "3.2.1.GA"}:
+{pkgs, pkgs_i686, xcodeVersion ? "5.0", tiVersion ? "3.2.3.GA"}:
 
 let
   # We have to use Oracle's JDK. On Darwin, just simply expose the host system's
@@ -29,7 +29,8 @@ rec {
   
   titaniumsdk = let
     titaniumSdkFile = if tiVersion == "3.1.4.GA" then ./titaniumsdk-3.1.nix
-      else if tiVersion == "3.2.2.GA" then ./titaniumsdk-3.2.nix
+      else if tiVersion == "3.2.3.GA" then ./titaniumsdk-3.2.nix
+      else if tiVersion == "3.3.0.GA" then ./titaniumsdk-3.3.nix
       else throw "Titanium version not supported: "+tiVersion;
     in
     import titaniumSdkFile {
diff --git a/pkgs/development/mobile/titaniumenv/examples/default.nix b/pkgs/development/mobile/titaniumenv/examples/default.nix
index 556b96975b4e..e5b439364535 100644
--- a/pkgs/development/mobile/titaniumenv/examples/default.nix
+++ b/pkgs/development/mobile/titaniumenv/examples/default.nix
@@ -1,7 +1,7 @@
 { nixpkgs ? <nixpkgs>
 , systems ? [ "x86_64-linux" "x86_64-darwin" ]
 , xcodeVersion ? "5.0"
-, tiVersion ? "3.2.2.GA"
+, tiVersion ? "3.2.3.GA"
 , rename ? false
 , newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? ""
 , allowUnfree ? false
diff --git a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix b/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix
index 95dd09be30dc..1725c826a52a 100644
--- a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix
+++ b/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix
@@ -1,4 +1,4 @@
-{ titaniumenv, fetchgit, target, androidPlatformVersions ? [ "11" ], tiVersion ? "3.2.1.GA", release ? false
+{ titaniumenv, fetchgit, target, androidPlatformVersions ? [ "14" ], tiVersion ? "3.2.3.GA", release ? false
 , rename ? false, stdenv ? null, newBundleId ? null, iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? null, iosCertificatePassword ? null
 }:
 
@@ -7,8 +7,8 @@ assert rename -> (stdenv != null && newBundleId != null && iosMobileProvisioning
 let
   src = fetchgit {
     url = https://github.com/appcelerator/KitchenSink.git;
-    rev = "0b8175f20f0aa71f93921025dec5d0f3299960ae";
-    sha256 = "0b2p4wbnlp46wpanqj5h3yfb2hdbh20nxbis8zscj4qlgrnyjdjz";
+    rev = "37d766ef9cba6a2d0b22634d3edc1fa8402109a0";
+    sha256 = "1d4x9zwq92p1krds52bd41qqsnsnb3a7x74bysbiphrvrphz80kk";
   };
   
   # Rename the bundle id to something else
diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix
index 1f0d53e99fe5..2ac4040714b0 100644
--- a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix
+++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.2.nix
@@ -1,14 +1,14 @@
 {stdenv, fetchurl, unzip, makeWrapper, python, jdk}:
 
 stdenv.mkDerivation {
-  name = "mobilesdk-3.2.2.v20140305122111";
+  name = "mobilesdk-3.2.3.GA";
   src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl {
-    url = http://builds.appcelerator.com.s3.amazonaws.com/mobile/3_2_X/mobilesdk-3.2.2.v20140305122111-linux.zip;
-    sha1 = "12dc1bfe8dd73db0650a235492f5f50c7b816d69";
+    url = http://builds.appcelerator.com/mobile/3.2.3/mobilesdk-3.2.3.GA-linux.zip;
+    sha1 = "303e6d19a0ca099d47f6862c00b261c6d0206cea";
   }
   else if stdenv.system == "x86_64-darwin" then fetchurl {
-    url = http://builds.appcelerator.com.s3.amazonaws.com/mobile/3_2_X/mobilesdk-3.2.2.v20140305122111-osx.zip;
-    sha1 = "9875b59faf0ab92e8996b58476466405ed60f6e2";
+    url = http://builds.appcelerator.com/mobile/3.2.3/mobilesdk-3.2.3.GA-osx.zip;
+    sha1 = "8c358cbd8624ffe3dfbd0283738105157067e0fb";
   }
   else throw "Platform: ${stdenv.system} not supported!";
   
@@ -28,8 +28,7 @@ stdenv.mkDerivation {
    
     # Rename ugly version number
     cd mobilesdk/*
-    mv 3.2.2.v20140305122111 3.2.2.GA
-    cd 3.2.2.GA
+    cd 3.2.3.GA
     
     # Zip files do not support timestamps lower than 1980. We have to apply a few work-arounds to cope with that
     # Yes, I know it's nasty :-)
diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix
new file mode 100644
index 000000000000..be3628f26449
--- /dev/null
+++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-3.3.nix
@@ -0,0 +1,77 @@
+{stdenv, fetchurl, unzip, makeWrapper, python, jdk}:
+
+stdenv.mkDerivation {
+  name = "mobilesdk-3.3.0.GA";
+  src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl {
+    url = http://builds.appcelerator.com/mobile/3.3.0/mobilesdk-3.3.0.GA-linux.zip;
+    sha1 = "9a9cca05a4cf8700df60b7e9d9cd969ecb70d81e";
+  }
+  else if stdenv.system == "x86_64-darwin" then fetchurl {
+    url = http://builds.appcelerator.com/mobile/3.3.0/mobilesdk-3.3.0.GA-osx.zip;
+    sha1 = "c6333e4da2564b9c51b865c1db49a062fbc743af";
+  }
+  else throw "Platform: ${stdenv.system} not supported!";
+  
+  buildInputs = [ unzip makeWrapper ];
+  
+  buildCommand = ''
+    mkdir -p $out
+    cd $out
+    yes y | unzip $src
+    
+    # Fix shebang header for python scripts
+    
+    find . -name \*.py | while read i
+    do
+        sed -i -e "s|#!/usr/bin/env python|#!${python}/bin/python|" $i
+    done
+   
+    # Rename ugly version number
+    cd mobilesdk/*
+    cd 3.3.0.GA
+    
+    # Zip files do not support timestamps lower than 1980. We have to apply a few work-arounds to cope with that
+    # Yes, I know it's nasty :-)
+    
+    cd android
+    
+    sed -i -f ${./fixtiverify.sed} builder.py
+    sed -i -f ${./fixtiprofiler.sed} builder.py
+    sed -i -f ${./fixso.sed} builder.py
+    sed -i -f ${./fixnativelibs.sed} builder.py
+    
+    # Patch some executables
+    
+    ${if stdenv.system == "i686-linux" then
+      ''
+        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux.so.2 titanium_prep.linux32
+      ''
+      else if stdenv.system == "x86_64-linux" then
+      ''
+        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64
+      ''
+      else ""}
+    
+    # Wrap builder script
+    
+    mv builder.py .builder.py
+    cat > builder.py <<EOF
+    #!${python}/bin/python
+    
+    import os, sys
+    
+    os.environ['PYTHONPATH'] = '$(echo ${python.modules.sqlite3}/lib/python*/site-packages)'
+    os.environ['JAVA_HOME'] = '${if stdenv.system == "x86_64-darwin" then jdk else "${jdk}/lib/openjdk"}'
+    
+    os.execv('$(pwd)/.builder.py', sys.argv)
+    EOF
+    
+    chmod +x builder.py
+    
+  '' + stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") ''
+    # 'ditto' utility is needed to copy stuff to the Xcode organizer. Dirty, but this allows it to work.
+    sed -i -e "s|ditto|/usr/bin/ditto|g" $out/mobilesdk/osx/*/iphone/builder.py
+    
+    sed -i -e "s|--xcode|--xcode '+process.env['NIX_TITANIUM_WORKAROUND']+'|" $out/mobilesdk/osx/*/iphone/cli/commands/_build.js
+  '';
+}
diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix
index ade629759f09..b5766c805522 100644
--- a/pkgs/development/mobile/xcodeenv/build-app.nix
+++ b/pkgs/development/mobile/xcodeenv/build-app.nix
@@ -60,7 +60,7 @@ stdenv.mkDerivation {
         security import ${certificateFile} -k $keychainName -P "${certificatePassword}" -A 
 
         # Determine provisioning ID
-        PROVISIONING_PROFILE=$(grep UUID -A1 -a ${provisioningProfile} | grep -o "[-A-Z0-9]\{36\}")
+        PROVISIONING_PROFILE=$(grep UUID -A1 -a ${provisioningProfile} | grep -o "[-A-Za-z0-9]\{36\}")
 
         if [ ! -f "$HOME/Library/MobileDevice/Provisioning Profiles/$PROVISIONING_PROFILE.mobileprovision" ]
         then