summary refs log tree commit diff
path: root/pkgs/development/mobile
diff options
context:
space:
mode:
authorSander van der Burg <sander@conference-compass.com>2013-01-07 16:52:42 +0100
committerSander van der Burg <sander@conference-compass.com>2013-01-07 16:52:42 +0100
commit5b0ca88d97d005a73a2be38e7a521af70875a718 (patch)
treeb2eba8467fa5e1ecd1cac6ab8513582651647e44 /pkgs/development/mobile
parenta547de1ecb14853487d864f70ad5e6a1cb3ce08d (diff)
downloadnixpkgs-5b0ca88d97d005a73a2be38e7a521af70875a718.tar
nixpkgs-5b0ca88d97d005a73a2be38e7a521af70875a718.tar.gz
nixpkgs-5b0ca88d97d005a73a2be38e7a521af70875a718.tar.bz2
nixpkgs-5b0ca88d97d005a73a2be38e7a521af70875a718.tar.lz
nixpkgs-5b0ca88d97d005a73a2be38e7a521af70875a718.tar.xz
nixpkgs-5b0ca88d97d005a73a2be38e7a521af70875a718.tar.zst
nixpkgs-5b0ca88d97d005a73a2be38e7a521af70875a718.zip
- Added xcodeenv: experimental support to build iOS apps through Nix
- Moved mobile development tools into a separate folder
Diffstat (limited to 'pkgs/development/mobile')
-rw-r--r--pkgs/development/mobile/androidenv/addon.xml950
-rw-r--r--pkgs/development/mobile/androidenv/addons.nix198
-rw-r--r--pkgs/development/mobile/androidenv/androidsdk.nix194
-rw-r--r--pkgs/development/mobile/androidenv/build-app.nix41
-rw-r--r--pkgs/development/mobile/androidenv/default.nix62
-rw-r--r--pkgs/development/mobile/androidenv/emulate-app.nix87
-rwxr-xr-xpkgs/development/mobile/androidenv/generate-addons.sh3
-rw-r--r--pkgs/development/mobile/androidenv/generate-addons.xsl38
-rwxr-xr-xpkgs/development/mobile/androidenv/generate-platforms.sh4
-rw-r--r--pkgs/development/mobile/androidenv/generate-platforms.xsl38
-rwxr-xr-xpkgs/development/mobile/androidenv/generate-sysimages.sh3
-rw-r--r--pkgs/development/mobile/androidenv/generate-sysimages.xsl36
-rw-r--r--pkgs/development/mobile/androidenv/platform-tools.nix41
-rw-r--r--pkgs/development/mobile/androidenv/platforms-linux.nix210
-rw-r--r--pkgs/development/mobile/androidenv/platforms-macosx.nix210
-rw-r--r--pkgs/development/mobile/androidenv/repository-7.xml1030
-rw-r--r--pkgs/development/mobile/androidenv/support.nix17
-rw-r--r--pkgs/development/mobile/androidenv/sysimages.nix50
-rw-r--r--pkgs/development/mobile/xcodeenv/build-app.nix92
-rw-r--r--pkgs/development/mobile/xcodeenv/default.nix15
-rw-r--r--pkgs/development/mobile/xcodeenv/simulate-app.nix17
-rw-r--r--pkgs/development/mobile/xcodeenv/xcodewrapper.nix24
22 files changed, 3360 insertions, 0 deletions
diff --git a/pkgs/development/mobile/androidenv/addon.xml b/pkgs/development/mobile/androidenv/addon.xml
new file mode 100644
index 00000000000..fb5d324d778
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/addon.xml
@@ -0,0 +1,950 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<sdk:sdk-addon xmlns:sdk="http://schemas.android.com/sdk/android/addon/5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+    <sdk:license id="android-sdk-license" type="text">Terms and Conditions
+
+This is the Android Software Development Kit License Agreement.
+
+
+1. Introduction
+
+
+1.1 The Android Software Development Kit (referred to in this License Agreement as the &quot;SDK&quot; and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK.
+
+1.2 &quot;Android&quot; means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
+
+1.3 &quot;Google&quot; means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
+
+
+2. Accepting this License Agreement
+
+
+2.1 In order to use the SDK, you must first agree to this License Agreement. You may not use the SDK if you do not accept this License Agreement.
+
+2.2 By clicking to accept, you hereby agree to the terms of this License Agreement.
+
+2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries including the country in which you are resident or from which you use the SDK.
+
+2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.
+
+
+3. SDK License from Google
+
+
+3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable and non-exclusive license to use the SDK solely to develop applications to run on the Android platform.
+
+3.2 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. &quot;Intellectual Property Rights&quot; means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
+
+3.3 You may not use the SDK for any purpose not expressly permitted by this License Agreement.  Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK.
+
+3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the SDK.
+
+3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement.
+
+3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you.
+
+3.7 Nothing in this License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
+
+3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.
+
+
+4. Use of the SDK by You
+
+
+4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
+
+4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) this License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
+
+4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
+
+4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier.
+
+4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
+
+4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
+
+
+5. Your Developer Credentials
+
+
+5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
+
+
+6. Privacy and Information
+
+
+6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected.
+
+6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy.
+
+
+7. Third Party Applications
+
+
+7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
+
+7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
+
+7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties.
+
+
+8. Using Android APIs
+
+
+8.1 Google Data APIs
+
+8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
+
+8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
+
+
+9. Terminating this License Agreement
+
+
+9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
+
+9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials.
+
+9.3 Google may at any time, terminate this License Agreement with you if:
+(A) you have breached any provision of this License Agreement; or
+(B) Google is required to do so by law; or
+(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
+(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
+
+9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
+
+
+10. DISCLAIMER OF WARRANTIES
+
+
+10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED &quot;AS IS&quot; AND &quot;AS AVAILABLE&quot; WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
+
+10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
+
+10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+
+
+11. LIMITATION OF LIABILITY
+
+
+11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
+
+
+12. Indemnification
+
+
+12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement.
+
+
+13. Changes to the License Agreement
+
+
+13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
+
+
+14. General Legal Terms
+
+
+14.1 This License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK.
+
+14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
+
+14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.
+
+14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.
+
+14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
+
+14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.
+
+14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
+
+November 13, 2012
+    </sdk:license>
+
+    <sdk:license id="android-googletv-license" type="text">Terms and Conditions
+
+This is the Google TV Add-on for the Android Software Development Kit License Agreement.
+
+1. Introduction
+
+1.1 The Google TV Add-on for the Android Software Development Kit (referred to in this License Agreement as the &quot;Google TV Add-on&quot; and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the Google TV Add-on.
+
+1.2 &quot;Google&quot; means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
+
+2. Accepting this License Agreement
+
+2.1 In order to use the Google TV Add-on, you must first agree to this License Agreement. You may not use the Google TV Add-on if you do not accept this License Agreement.
+
+2.2 You can accept this License Agreement by:
+
+(A) clicking to accept or agree to this License Agreement, where this option is made available to you; or
+
+(B) by actually using the Google TV Add-on.  In this case, you agree that use of the Google TV Add-on constitutes acceptance of the License Agreement from that point onwards.
+
+2.3 You may not use the Google TV Add-on and may not accept the Licensing Agreement if you are a person barred from receiving the Google TV Add-on under the laws of the United States or other countries including the country in which you are resident or from which you use the Google TV Add-on.
+
+2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the Licensing Agreement or use the Google TV Add-on on behalf of your employer or other entity.
+
+3. Google TV Add-on License from Google
+
+3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non- assignable and non-exclusive license to use the Google TV Add-on solely to develop applications to run on the Google TV platform.
+
+3.2 You agree that Google or third parties own all legal right, title and interest in and to the Google TV Add-on, including any Intellectual Property Rights that subsist in the Google TV Add-on. &quot;Intellectual Property Rights&quot; means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
+
+3.3 Except to the extent required by applicable third party licenses, you may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Google TV Add-on or any part of the Google TV Add-on. Except to the extent required by applicable third party licenses, you may not load any part of the Google TV Add-on onto a mobile handset, television, or any other hardware device except a personal computer, combine any part of the Google TV Add-on with other software, or distribute any software or device incorporating a part of the Google TV Add-on.
+
+3.4 Use, reproduction and distribution of components of the Google TV Add-on licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement.
+
+3.5 You agree that the form and nature of the Google TV Add-on that Google provides may change without prior notice to you and that future versions of the Google TV Add-on may be incompatible with applications developed on previous versions of the Google TV Add-on. You agree that Google may stop (permanently or temporarily) providing the Google TV Add-on (or any features within the Google TV Add-on) to you or to users generally at Google's sole discretion, without prior notice to you.
+
+3.6 Nothing in this License Agreement gives you a right to use any of Google's or it’s licensors’ trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
+
+3.7 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Google TV Add-on.
+
+4. Use of the Google TV Add-on by You
+
+4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the Google TV Add-on, including any intellectual property rights that subsist in those applications.
+
+4.2 You agree to use the Google TV Add-on and write applications only for purposes that are permitted by (a) this License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
+
+4.3 You agree that if you use the Google TV Add-on to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, your must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you explicit permission to do so.
+
+4.4 You agree that you will not engage in any activity with the Google TV Add-on, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google, Multichannel Video Program Distributors or any mobile communications carrier.
+
+4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through the Google TV platform and/or applications for the Google TV platform, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
+
+4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
+
+5. Your Developer Credentials
+
+5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
+
+6. Privacy and Information
+
+6.1 In order to continually innovate and improve the Google TV Add-on, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Google TV Add-on are being used and how they are being used. Before any of this information is collected, the Google TV Add-on will notify you and seek your consent. If you withhold consent, the information will not be collected.
+
+6.2 The data collected is examined in the aggregate to improve the Google TV Add-on and is maintained in accordance with Google's Privacy Policy.
+
+7. Third Party Applications for the Google TV Platform
+
+7.1 If you use the Google TV Add-on to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
+
+7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
+
+7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties.
+
+8. Using Google TV APIs
+
+8.1 If you use any Google TV API to retrieve data from Google, you acknowledge that the data (“Google TV API Content”) may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.  Some portions of the Google TV API Content are licensed to Google by third parties, including but not limited to Tribune Media Services
+
+8.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
+
+8.3 Except as explicitly permitted in Section 3 (Google TV Add-on License from Google), you must:
+
+(a) not modify nor format the Google TV API Content except to the extent reasonably and technically necessary to optimize the display such Google TV API Content in your application;
+
+(b) not edit the Google TV API Content in a manner that renders the Google TV API Content inaccurate of alters its inherent meaning (provided that displaying excerpts will not violate the foregoing); or
+
+(c)  not create any commercial audience measurement tool or service using the Google TV API Content
+
+9. Terminating this License Agreement
+
+9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
+
+9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the Google TV Add-on and any relevant developer credentials.
+
+9.3 Google may at any time, terminate this License Agreement with you if:
+
+(A) you have breached any provision of this License Agreement; or
+
+(B) Google is required to do so by law; or
+
+(C) the partner with whom Google offered certain parts of Google TV Add-on (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the Google TV Add-on to you; or
+
+(D) Google decides to no longer providing the Google TV Add-on or certain parts of the Google TV Add-on to users in the country in which you are resident or from which you use the service, or the provision of the Google TV Add-on or certain Google TV Add-on services to you by Google is, in Google's sole discretion, no longer commercially viable.
+
+9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
+
+10. DISCLAIMER OF WARRANTIES
+
+10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE GOOGLE TV ADD-ON IS AT YOUR SOLE RISK AND THAT THE GOOGLE TV ADD-ON IS PROVIDED &quot;AS IS&quot; AND &quot;AS AVAILABLE&quot; WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
+
+10.2 YOUR USE OF THE GOOGLE TV ADD-ON AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE GOOGLE TV ADD-ON IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
+
+10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+
+11. LIMITATION OF LIABILITY
+
+11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
+
+12. Indemnification
+
+12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the Google TV Add-on, (b) any application you develop on the Google TV Add-on that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement.
+
+13. Changes to the License Agreement
+
+13.1 Google may make changes to the License Agreement as it distributes new versions of the Google TV Add-on.
+
+14. General Legal Terms
+
+14.1 This License Agreement constitute the whole legal agreement between you and Google and govern your use of the Google TV Add-on (excluding any services which Google may provide to you under a separate written agreement), and completely replace any prior agreements between you and Google in relation to the Google TV Add-on.
+
+14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
+
+14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.
+
+14.4 You acknowledge and agree that Google’s API data licensors and each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.
+
+14.5 EXPORT RESTRICTIONS. THE GOOGLE TV ADD-ON IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE GOOGLE TV ADD-ON. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
+
+14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.
+
+14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
+
+
+August 15, 2011
+   </sdk:license>
+
+    <!-- ADD-ONS ....................... -->
+
+    <sdk:add-on>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:api-level>3</sdk:api-level>
+        <sdk:revision>03</sdk:revision>
+        <sdk:description>Android + Google APIs</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>34908058</sdk:size>
+                <sdk:checksum type="sha1">1f92abf3a76be66ae8032257fc7620acbd2b2e3a</sdk:checksum>
+                <sdk:url>google_apis-3-r03.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+                <sdk:description>API for Google Maps.</sdk:description>
+            </sdk:lib>
+        </sdk:libs>
+    </sdk:add-on>
+
+    <!-- Generated on Tue Nov 24 16:38:28 PST 2009 using donut 20842: Platform. Addon. -->
+
+    <sdk:add-on>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:api-level>4</sdk:api-level>
+        <sdk:revision>2</sdk:revision>
+        <sdk:description>Android + Google APIs, revision 2</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>42435735</sdk:size>
+                <sdk:checksum type="sha1">9b6e86d8568558de4d606a7debc4f6049608dbd0</sdk:checksum>
+                <sdk:url>google_apis-4_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+                <sdk:description>API for Google Maps.</sdk:description>
+            </sdk:lib>
+        </sdk:libs>
+    </sdk:add-on>
+
+    <!-- Generated on Thu Oct 22 10:16:34 PDT 2009 using eclair-sdk 17704: Platform. Addon. Tools. Doc. -->
+
+    <sdk:add-on>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:api-level>5</sdk:api-level>
+        <sdk:revision>01</sdk:revision>
+        <sdk:description>Android + Google APIs, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:obsolete/>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>49123776</sdk:size>
+                <sdk:checksum type="sha1">46eaeb56b645ee7ffa24ede8fa17f3df70db0503</sdk:checksum>
+                <sdk:url>google_apis-5_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+                <sdk:description>API for Google Maps.</sdk:description>
+            </sdk:lib>
+        </sdk:libs>
+    </sdk:add-on>
+
+    <!-- Generated on Mon Nov 23 14:08:02 PST 2009 using eclair-release 20723: Platform. Addon. -->
+
+    <sdk:add-on>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:api-level>6</sdk:api-level>
+        <sdk:revision>1</sdk:revision>
+        <sdk:description>Android + Google APIs, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:obsolete/>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>53382941</sdk:size>
+                <sdk:checksum type="sha1">5ff545d96e031e09580a6cf55713015c7d4936b2</sdk:checksum>
+                <sdk:url>google_apis-6_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+                <sdk:description>API for Google Maps.</sdk:description>
+            </sdk:lib>
+        </sdk:libs>
+    </sdk:add-on>
+
+    <!-- Generated on Mon Dec 21 14:36:17 PST 2009 using eclair-release 22607: Platform. Addon. -->
+
+    <sdk:add-on>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:api-level>7</sdk:api-level>
+        <sdk:revision>1</sdk:revision>
+        <sdk:description>Android + Google APIs, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>53691339</sdk:size>
+                <sdk:checksum type="sha1">2e7f91e0fe34fef7f58aeced973c6ae52361b5ac</sdk:checksum>
+                <sdk:url>google_apis-7_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+                <sdk:description>API for Google Maps.</sdk:description>
+            </sdk:lib>
+        </sdk:libs>
+    </sdk:add-on>
+
+    <!-- Generated on Wed Jun 30 16:13:06 PDT 2010 using froyo-release 43546: Platform. Addon. -->
+
+    <sdk:add-on>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:api-level>8</sdk:api-level>
+        <sdk:revision>2</sdk:revision>
+        <sdk:description>Android + Google APIs, API 8, revision 2</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>59505020</sdk:size>
+                <sdk:checksum type="sha1">3079958e7ec87222cac1e6b27bc471b27bf2c352</sdk:checksum>
+                <sdk:url>google_apis-8_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+                <sdk:description>API for Google Maps.</sdk:description>
+            </sdk:lib>
+        </sdk:libs>
+    </sdk:add-on>
+
+    <!-- Generated on Thu Jan 20 13:47:16 PST 2011 using gingerbread-sdk-release 93351: Addon. -->
+
+    <sdk:add-on>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:api-level>9</sdk:api-level>
+        <sdk:revision>2</sdk:revision>
+        <sdk:description>Android + Google APIs, API 9, revision 2</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>63401546</sdk:size>
+                <sdk:checksum type="sha1">78664645a1e9accea4430814f8694291a7f1ea5d</sdk:checksum>
+                <sdk:url>google_apis-9_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+                <sdk:description>API for Google Maps.</sdk:description>
+            </sdk:lib>
+        </sdk:libs>
+        <sdk:obsolete/>
+    </sdk:add-on>
+
+    <!-- Generated on Thu May  5 15:52:16 PDT 2011 using gingerbread 123630: Addon. -->
+
+    <sdk:add-on>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:api-level>10</sdk:api-level>
+        <sdk:revision>2</sdk:revision>
+        <sdk:description>Android + Google APIs, API 10, revision 2</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>65781578</sdk:size>
+                <sdk:checksum type="sha1">cc0711857c881fa7534f90cf8cc09b8fe985484d</sdk:checksum>
+                <sdk:url>google_apis-10_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+                <sdk:description>API for Google Maps.</sdk:description>
+            </sdk:lib>
+        </sdk:libs>
+    </sdk:add-on>
+
+    <!-- Generated on Thu Feb 17 08:43:44 PST 2011 using honeycomb 104254: Addon. -->
+
+    <sdk:add-on>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:api-level>11</sdk:api-level>
+        <sdk:revision>1</sdk:revision>
+        <sdk:description>Android + Google APIs, API 11, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>83477179</sdk:size>
+                <sdk:checksum type="sha1">5eab5e81addee9f3576d456d205208314b5146a5</sdk:checksum>
+                <sdk:url>google_apis-11_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+                <sdk:description>API for Google Maps.</sdk:description>
+            </sdk:lib>
+        </sdk:libs>
+    </sdk:add-on>
+
+    <!-- Generated on Wed May  4 19:44:46 PDT 2011 using honeycomb-mr1 123685: Addon. -->
+
+    <sdk:add-on>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:api-level>12</sdk:api-level>
+        <sdk:revision>1</sdk:revision>
+        <sdk:description>Android + Google APIs, API 12, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>86099835</sdk:size>
+                <sdk:checksum type="sha1">e9999f4fa978812174dfeceec0721c793a636e5d</sdk:checksum>
+                <sdk:url>google_apis-12_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+                <sdk:description>API for Google Maps.</sdk:description>
+            </sdk:lib>
+        </sdk:libs>
+    </sdk:add-on>
+
+    <!-- Generated on Fri Jul 15 11:51:11 PDT 2011 using honeycomb-mr2 142871: Addon. -->
+
+    <sdk:add-on>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:api-level>13</sdk:api-level>
+        <sdk:revision>1</sdk:revision>
+        <sdk:description>Android + Google APIs, API 13, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>88615525</sdk:size>
+                <sdk:checksum type="sha1">3b153edd211c27dc736c893c658418a4f9041417</sdk:checksum>
+                <sdk:url>google_apis-13_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+                <sdk:description>API for Google Maps.</sdk:description>
+            </sdk:lib>
+        </sdk:libs>
+    </sdk:add-on>
+
+    <sdk:add-on>
+        <!-- Generated at Wed Dec  7 13:47:50 2011 from git_ics-mr0 @ 229537 -->
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:description>Android + Google APIs</sdk:description>
+        <sdk:api-level>14</sdk:api-level>
+        <sdk:revision>2</sdk:revision>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+            </sdk:lib>
+            <sdk:lib>
+                <sdk:name>com.android.future.usb.accessory</sdk:name>
+            </sdk:lib>
+        </sdk:libs>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>106533714</sdk:size>
+                <sdk:checksum type="sha1">f8eb4d96ad0492b4c0db2d7e4f1a1a3836664d39</sdk:checksum>
+                <sdk:url>google_apis-14_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+    </sdk:add-on>
+
+    <sdk:add-on>
+        <!-- Generated at Fri Mar 30 10:45:40 2012 from ics-mr1 @ 302030 -->
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:description>Android + Google APIs</sdk:description>
+        <sdk:api-level>15</sdk:api-level>
+        <sdk:revision>2</sdk:revision>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+            </sdk:lib>
+            <sdk:lib>
+                <sdk:name>com.android.future.usb.accessory</sdk:name>
+            </sdk:lib>
+            <sdk:lib>
+                <sdk:name>com.google.android.media.effects</sdk:name>
+            </sdk:lib>
+        </sdk:libs>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>106612472</sdk:size>
+                <sdk:checksum type="sha1">6757c12788da0ea00c2ab58e54cb438b9f2bcf66</sdk:checksum>
+                <sdk:url>google_apis-15_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:add-on>
+
+    <sdk:add-on>
+        <!-- Generated at Tue Oct  9 14:06:38 2012 from git_jb-dev @ 495790 -->
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:description>Android + Google APIs</sdk:description>
+        <sdk:api-level>16</sdk:api-level>
+        <sdk:revision>3</sdk:revision>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+            </sdk:lib>
+            <sdk:lib>
+                <sdk:name>com.android.future.usb.accessory</sdk:name>
+            </sdk:lib>
+            <sdk:lib>
+                <sdk:name>com.google.android.media.effects</sdk:name>
+            </sdk:lib>
+        </sdk:libs>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>127278413</sdk:size>
+                <sdk:checksum type="sha1">63467dd32f471e3e81e33e9772c22f33235aa3b3</sdk:checksum>
+                <sdk:url>google_apis-16_r03.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:add-on>
+
+    <!-- GOOGLE TV ADDONS ............. -->
+
+    <sdk:add-on>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_tv_addon</sdk:name-id>
+        <sdk:name-display>Google TV Addon</sdk:name-display>
+        <sdk:api-level>12</sdk:api-level>
+        <sdk:revision>2</sdk:revision>
+        <sdk:description>Android + Google TV, API 12, preview release</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:uses-license ref="android-googletv-license"/>
+        <sdk:archives>
+            <sdk:archive os="linux">
+                <sdk:size>78266751</sdk:size>
+                <sdk:checksum type="sha1">92128a12e7e8b0fb5bac59153d7779b717e7b840</sdk:checksum>
+                <sdk:url>google_tv-12_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:libs/>
+    </sdk:add-on>
+
+    <sdk:add-on>
+        <!-- Generated at Mon Nov 12 17:15:51 2012 from git_jb-mr1-dev @ 526865 -->
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-id>google_apis</sdk:name-id>
+        <sdk:name-display>Google APIs</sdk:name-display>
+        <sdk:description>Android + Google APIs</sdk:description>
+        <sdk:api-level>17</sdk:api-level>
+        <sdk:revision>1</sdk:revision>
+        <sdk:libs>
+            <sdk:lib>
+                <sdk:name>com.google.android.maps</sdk:name>
+            </sdk:lib>
+            <sdk:lib>
+                <sdk:name>com.android.future.usb.accessory</sdk:name>
+            </sdk:lib>
+            <sdk:lib>
+                <sdk:name>com.google.android.media.effects</sdk:name>
+            </sdk:lib>
+        </sdk:libs>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>132568033</sdk:size>
+                <sdk:checksum type="sha1">62cb086f11e15713878c8834d58ef1a2454c19a4</sdk:checksum>
+                <sdk:url>google_apis-17_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:add-on>
+
+    <!-- EXTRAS VENDOR=ANDROID ........................ -->
+
+    <sdk:extra>
+        <!-- Generated at Mon Nov 12 17:16:25 2012 from git_jb-mr1-dev @ 526865 -->
+        <sdk:revision>11</sdk:revision>
+        <sdk:vendor-display>Android</sdk:vendor-display>
+        <sdk:vendor-id>android</sdk:vendor-id>
+        <sdk:name-display>Android Support Library</sdk:name-display>
+        <sdk:path>support</sdk:path>
+        <sdk:old-paths>compatibility</sdk:old-paths>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>1264808</sdk:size>
+                <sdk:checksum type="sha1">d30d182d8e4c86bb4464c03a83ccffce7bc84ecd</sdk:checksum>
+                <sdk:url>support_r11.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:extra>
+
+    <!-- EXTRAS VENDOR=GOOGLE ....................... -->
+
+    <sdk:extra>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-display>Google Play Licensing Library</sdk:name-display>
+        <sdk:path>play_licensing</sdk:path>
+        <sdk:old-paths>market_licensing</sdk:old-paths>
+        <sdk:revision>2</sdk:revision>
+        <sdk:description>Google Play Licensing client library</sdk:description>
+        <sdk:desc-url>http://developer.android.com/guide/publishing/licensing.html</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>75109</sdk:size>
+                <sdk:checksum type="sha1">355e8dc304a92a5616db235af8ee7bd554356254</sdk:checksum>
+                <sdk:url>market_licensing-r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:extra>
+
+    <sdk:extra>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-display>Google Play APK Expansion Library</sdk:name-display>
+        <sdk:path>play_apk_expansion</sdk:path>
+        <sdk:old-paths>market_apk_expansion</sdk:old-paths>
+        <sdk:revision>2</sdk:revision>
+        <sdk:description>Google Play APK Expansion library</sdk:description>
+        <sdk:desc-url>http://developer.android.com/guide/market/expansion-files.html</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>111636</sdk:size>
+                <sdk:checksum type="sha1">47fa8c691fcc8cf815e7ebbf140f12e94495f73b</sdk:checksum>
+                <sdk:url>market_apk_expansion-r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:extra>
+
+    <sdk:extra>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-display>Google Play services</sdk:name-display>
+        <sdk:path>google_play_services</sdk:path>
+        <sdk:revision>4</sdk:revision>
+        <sdk:description>Google Play Services client library and sample code</sdk:description>
+        <sdk:desc-url>https://developers.google.com/android/google-play-services/index</sdk:desc-url>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>3732458</sdk:size>
+                <sdk:checksum type="sha1">bbb3d11225fcf60a0bae75afa2c4737010468bf6</sdk:checksum>
+                <sdk:url>google_play_services_2012110_r04.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+    </sdk:extra>
+
+    <sdk:extra>
+        <!-- Generated at Tue Aug 28 11:07:05 2012 from git_master @ 449897 -->
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-display>Google USB Driver</sdk:name-display>
+        <sdk:path>usb_driver</sdk:path>
+        <sdk:revision>7</sdk:revision>
+        <sdk:description>USB Driver for Windows, revision 7</sdk:description>
+        <sdk:desc-url>http://developer.android.com/</sdk:desc-url>
+        <sdk:uses-license ref="android-sdk-license"/>
+        <sdk:archives>
+            <sdk:archive os="windows">
+                <sdk:size>8681704</sdk:size>
+                <sdk:checksum type="sha1">147c339fde22f98ae41b15349a8303d39a2cf6e5</sdk:checksum>
+                <sdk:url>usb_driver_r07-windows.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+    </sdk:extra>
+
+    <sdk:extra>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-display>Google Play Billing Library</sdk:name-display>
+        <sdk:path>play_billing</sdk:path>
+        <sdk:old-paths>market_billing</sdk:old-paths>
+        <sdk:revision>3</sdk:revision>
+        <sdk:description>Google Play Billing files and sample code</sdk:description>
+        <sdk:desc-url>http://developer.android.com/google/play/billing/index.html</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>435718</sdk:size>
+                <sdk:checksum type="sha1">a133d454c992ef2a18e62fa810e8185f1be4b054</sdk:checksum>
+                <sdk:url>play_billing_r03.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:extra>
+
+    <sdk:extra>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-display>Google AdMob Ads SDK</sdk:name-display>
+        <sdk:path>admob_ads_sdk</sdk:path>
+        <sdk:revision>8</sdk:revision>
+        <sdk:description>AdMob Ads SDK</sdk:description>
+        <sdk:desc-url>https://developers.google.com/mobile-ads-sdk/docs/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>545547</sdk:size>
+                <sdk:checksum type="sha1">031476aa5a491239d2624e8de8c9e46e40d93e3f</sdk:checksum>
+                <sdk:url>https://dl-ssl.google.com/googleadmobadssdk/googleadmobadssdkandroid-6.2.1.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:extra>
+
+    <sdk:extra>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-display>Google Analytics SDK</sdk:name-display>
+        <sdk:path>analytics_sdk</sdk:path>
+        <sdk:revision>2</sdk:revision>
+        <sdk:description>Analytics SDK</sdk:description>
+        <sdk:desc-url>http://code.google.com/mobile/analytics/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>53055</sdk:size>
+                <sdk:checksum type="sha1">328bcdc6c241879ebb04d6edc6fec1052a171004</sdk:checksum>
+                <sdk:url>https://dl.google.com/gaformobileapps/GoogleAnalyticsAndroid_1.4.2.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:extra>
+
+    <sdk:extra>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-display>Google Web Driver</sdk:name-display>
+        <sdk:path>webdriver</sdk:path>
+        <sdk:revision>2</sdk:revision>
+        <sdk:description>WebDriver</sdk:description>
+        <sdk:desc-url>http://selenium.googlecode.com</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>4055193</sdk:size>
+                <sdk:checksum type="sha1">13f3a3b2670a5fc04a7342861644be9a01b07e38</sdk:checksum>
+                <sdk:url>webdriver_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:extra>
+
+    <sdk:extra>
+        <sdk:vendor-id>google</sdk:vendor-id>
+        <sdk:vendor-display>Google Inc.</sdk:vendor-display>
+        <sdk:name-display>Google Cloud Messaging for Android Library</sdk:name-display>
+        <sdk:path>gcm</sdk:path>
+        <sdk:revision>3</sdk:revision>
+        <sdk:description>Google Cloud Messaging for Android library and sample code</sdk:description>
+        <sdk:desc-url>https://developers.google.com/android/gcm/index</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive os="any">
+                <sdk:size>5901400</sdk:size>
+                <sdk:checksum type="sha1">ad066fd0dc7fc99d8aadac09c65a3c2519fbc7bf</sdk:checksum>
+                <sdk:url>gcm_r03.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:extra>
+</sdk:sdk-addon>
diff --git a/pkgs/development/mobile/androidenv/addons.nix b/pkgs/development/mobile/androidenv/addons.nix
new file mode 100644
index 00000000000..f26db5c2cb7
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/addons.nix
@@ -0,0 +1,198 @@
+
+{stdenv, fetchurl, unzip}:
+
+let
+  buildGoogleApis = args:
+    stdenv.mkDerivation (args // {
+      buildInputs = [ unzip ];
+      buildCommand = ''
+        mkdir -p $out
+        cd $out
+        unzip $src
+      '';
+    });
+in
+{
+    
+  google_apis_3 = buildGoogleApis {
+    name = "google_apis-3";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-3-r03.zip;
+        sha1 = "1f92abf3a76be66ae8032257fc7620acbd2b2e3a";
+      };
+      meta = {
+        description = "Android + Google APIs";
+        url = http://developer.android.com/;
+      };
+    };
+    
+  google_apis_4 = buildGoogleApis {
+    name = "google_apis-4";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-4_r02.zip;
+        sha1 = "9b6e86d8568558de4d606a7debc4f6049608dbd0";
+      };
+      meta = {
+        description = "Android + Google APIs, revision 2";
+        url = http://developer.android.com/;
+      };
+    };
+    
+  google_apis_5 = buildGoogleApis {
+    name = "google_apis-5";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-5_r01.zip;
+        sha1 = "46eaeb56b645ee7ffa24ede8fa17f3df70db0503";
+      };
+      meta = {
+        description = "Android + Google APIs, revision 1";
+        url = http://developer.android.com/;
+      };
+    };
+    
+  google_apis_6 = buildGoogleApis {
+    name = "google_apis-6";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-6_r01.zip;
+        sha1 = "5ff545d96e031e09580a6cf55713015c7d4936b2";
+      };
+      meta = {
+        description = "Android + Google APIs, revision 1";
+        url = http://developer.android.com/;
+      };
+    };
+    
+  google_apis_7 = buildGoogleApis {
+    name = "google_apis-7";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-7_r01.zip;
+        sha1 = "2e7f91e0fe34fef7f58aeced973c6ae52361b5ac";
+      };
+      meta = {
+        description = "Android + Google APIs, revision 1";
+        url = http://developer.android.com/;
+      };
+    };
+    
+  google_apis_8 = buildGoogleApis {
+    name = "google_apis-8";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-8_r02.zip;
+        sha1 = "3079958e7ec87222cac1e6b27bc471b27bf2c352";
+      };
+      meta = {
+        description = "Android + Google APIs, API 8, revision 2";
+        url = http://developer.android.com/;
+      };
+    };
+    
+  google_apis_9 = buildGoogleApis {
+    name = "google_apis-9";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-9_r02.zip;
+        sha1 = "78664645a1e9accea4430814f8694291a7f1ea5d";
+      };
+      meta = {
+        description = "Android + Google APIs, API 9, revision 2";
+        url = http://developer.android.com/;
+      };
+    };
+    
+  google_apis_10 = buildGoogleApis {
+    name = "google_apis-10";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-10_r02.zip;
+        sha1 = "cc0711857c881fa7534f90cf8cc09b8fe985484d";
+      };
+      meta = {
+        description = "Android + Google APIs, API 10, revision 2";
+        url = http://developer.android.com/;
+      };
+    };
+    
+  google_apis_11 = buildGoogleApis {
+    name = "google_apis-11";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-11_r01.zip;
+        sha1 = "5eab5e81addee9f3576d456d205208314b5146a5";
+      };
+      meta = {
+        description = "Android + Google APIs, API 11, revision 1";
+        url = http://developer.android.com/;
+      };
+    };
+    
+  google_apis_12 = buildGoogleApis {
+    name = "google_apis-12";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-12_r01.zip;
+        sha1 = "e9999f4fa978812174dfeceec0721c793a636e5d";
+      };
+      meta = {
+        description = "Android + Google APIs, API 12, revision 1";
+        url = http://developer.android.com/;
+      };
+    };
+    
+  google_apis_13 = buildGoogleApis {
+    name = "google_apis-13";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-13_r01.zip;
+        sha1 = "3b153edd211c27dc736c893c658418a4f9041417";
+      };
+      meta = {
+        description = "Android + Google APIs, API 13, revision 1";
+        url = http://developer.android.com/;
+      };
+    };
+    
+  google_apis_14 = buildGoogleApis {
+    name = "google_apis-14";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-14_r02.zip;
+        sha1 = "f8eb4d96ad0492b4c0db2d7e4f1a1a3836664d39";
+      };
+      meta = {
+        description = "Android + Google APIs";
+        
+      };
+    };
+    
+  google_apis_15 = buildGoogleApis {
+    name = "google_apis-15";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-15_r02.zip;
+        sha1 = "6757c12788da0ea00c2ab58e54cb438b9f2bcf66";
+      };
+      meta = {
+        description = "Android + Google APIs";
+        
+      };
+    };
+    
+  google_apis_16 = buildGoogleApis {
+    name = "google_apis-16";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-16_r03.zip;
+        sha1 = "63467dd32f471e3e81e33e9772c22f33235aa3b3";
+      };
+      meta = {
+        description = "Android + Google APIs";
+        
+      };
+    };
+    
+  google_apis_17 = buildGoogleApis {
+    name = "google_apis-17";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/google_apis-17_r01.zip;
+        sha1 = "62cb086f11e15713878c8834d58ef1a2454c19a4";
+      };
+      meta = {
+        description = "Android + Google APIs";
+        
+      };
+    };
+    
+}
+  
\ No newline at end of file
diff --git a/pkgs/development/mobile/androidenv/androidsdk.nix b/pkgs/development/mobile/androidenv/androidsdk.nix
new file mode 100644
index 00000000000..e8e1f919fe4
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/androidsdk.nix
@@ -0,0 +1,194 @@
+{ stdenv, stdenv_32bit, fetchurl, unzip, makeWrapper
+, platformTools, support, platforms, sysimages, addons
+, zlib_32bit
+, libX11_32bit, libxcb_32bit, libXau_32bit, libXdmcp_32bit, libXext_32bit
+, libX11, libXext, libXrender, libxcb, libXau, libXdmcp
+, freetype, fontconfig, gtk, atk
+}:
+{platformVersions, useGoogleAPIs}:
+
+stdenv.mkDerivation {
+  name = "android-sdk-21";
+  
+  src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
+    then fetchurl {
+      url = http://dl.google.com/android/android-sdk_r21-linux.tgz;
+      md5 = "7f8d73b629f808cdcfc9f9900bbd7580";
+    }
+    else if stdenv.system == "x86_64-darwin" then fetchurl {
+      url = http://dl.google.com/android/android-sdk_r21-macosx.zip;
+      md5 = "67e46adca90dd18d7291443f6c15d6af";
+    }
+    else throw "platform not ${stdenv.system} supported!";
+  
+  buildCommand = ''
+    mkdir -p $out/libexec
+    cd $out/libexec
+    unpackFile $src;
+    
+    cd android-sdk-*/tools
+    
+    ${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
+    ''
+      # There are a number of native binaries. We must patch them to let them find the interpreter and libstdc++
+    
+      for i in dmtracedump emulator emulator-arm emulator-mips emulator-x86 hprof-conv mksdcard sqlite3
+      do
+          patchelf --set-interpreter ${stdenv_32bit.gcc.libc}/lib/ld-linux.so.2 $i
+          patchelf --set-rpath ${stdenv_32bit.gcc.gcc}/lib $i
+      done
+    
+      ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
+        # We must also patch the 64-bit emulator instances, if needed
+        
+        for i in emulator64-arm emulator64-mips emulator64-x86
+        do
+            patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2 $i
+            patchelf --set-rpath ${stdenv.gcc.gcc}/lib64 $i
+        done
+      ''}
+      
+      # These tools also need zlib in addition to libstdc++
+    
+      for i in etc1tool zipalign
+      do
+          patchelf --set-interpreter ${stdenv_32bit.gcc.libc}/lib/ld-linux.so.2 $i
+          patchelf --set-rpath ${stdenv_32bit.gcc.gcc}/lib:${zlib_32bit}/lib $i
+      done
+    
+      # The emulators need additional libraries, which are not in the RPATH => let's wrap them
+    
+      for i in emulator emulator-arm emulator-mips emulator-x86
+      do
+          wrapProgram `pwd`/$i \
+            --prefix LD_LIBRARY_PATH : `pwd`/lib:${libX11_32bit}/lib:${libxcb_32bit}/lib:${libXau_32bit}/lib:${libXdmcp_32bit}/lib:${libXext_32bit}/lib
+      done
+      
+      ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
+        for i in emulator64-arm emulator64-mips emulator64-x86
+        do
+            wrapProgram `pwd`/$i \
+            --prefix LD_LIBRARY_PATH : `pwd`/lib:${libX11}/lib:${libxcb}/lib:${libXau}/lib:${libXdmcp}/lib:${libXext}/lib
+        done
+      ''}
+    ''}
+
+    patchShebangs .
+    
+    ${if stdenv.system == "i686-linux" then
+      ''
+        # The monitor requires some more patching
+        
+        cd lib/monitor-x86
+        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux.so.2 monitor
+        patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so
+        
+        wrapProgram `pwd`/monitor \
+          --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.gcc.gcc}/lib
+
+        cd ../..
+      ''
+      else if stdenv.system == "x86_64-linux" then
+      ''
+        # The monitor requires some more patching
+        
+        cd lib/monitor-x86_64
+        patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2 monitor
+        patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so
+        
+        wrapProgram `pwd`/monitor \
+          --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.gcc.gcc}/lib
+
+        cd ../..
+      ''
+      else ""}
+    
+    # Symlink the other sub packages
+    
+    cd ..
+    ln -s ${platformTools}/platform-tools
+    ln -s ${support}/support
+    
+    # Symlink required Google API add-ons
+    
+    mkdir -p add-ons
+    cd add-ons
+    
+    ${if useGoogleAPIs then
+        stdenv.lib.concatMapStrings (platformVersion:
+        if (builtins.hasAttr ("google_apis_"+platformVersion) addons) then
+          let
+            googleApis = builtins.getAttr ("google_apis_"+platformVersion) addons;
+          in
+          "ln -s ${googleApis}/* addon-google_apis-${platformVersion}"
+        else "") platformVersions
+      else ""}
+      
+    cd ..
+
+    # Symlink required platforms
+   
+    mkdir -p platforms
+    cd platforms
+    
+    ${stdenv.lib.concatMapStrings (platformVersion:
+      if (builtins.hasAttr ("platform_"+platformVersion) platforms) then
+        let
+          platform = builtins.getAttr ("platform_"+platformVersion) platforms;
+        in
+        "ln -s ${platform}/* android-${platformVersion}"
+      else ""
+    ) platformVersions}
+    
+    cd ..
+    
+    # Symlink required system images
+  
+    mkdir -p system-images
+    cd system-images
+    
+    ${stdenv.lib.concatMapStrings (platformVersion:
+      if (builtins.hasAttr ("sysimg_"+platformVersion) sysimages) then
+        let
+          sysimg = builtins.getAttr ("sysimg_"+platformVersion) sysimages;
+        in
+        ''
+          mkdir -p android-${platformVersion}
+          cd android-${platformVersion}
+          ln -s ${sysimg}/*
+          cd ..
+        ''
+      else ""
+    ) platformVersions}
+    
+    # Create wrappers to the most important tools and platform tools so that we can run them if the SDK is in our PATH
+    
+    ensureDir $out/bin
+
+    for i in $out/libexec/android-sdk-*/tools/*
+    do
+        if [ ! -d $i ] && [ -x $i ]
+        then
+            ( echo '#! ${stdenv.shell} -e'
+              echo "cd $out/libexec/android-sdk-*/tools"
+              echo "exec ./$(basename $i) \"\$@\"" ) > $out/bin/$(basename $i)
+          
+              chmod +x $out/bin/$(basename $i)
+        fi
+    done
+    
+    for i in $out/libexec/android-sdk-*/platform-tools/*
+    do
+        if [ ! -d $i ] && [ -x $i ]
+        then
+            ( echo '#! ${stdenv.shell} -e'
+              echo "cd $out/libexec/android-sdk-*/platform-tools"
+              echo "exec ./$(basename $i) \"\$@\"") > $out/bin/$(basename $i)
+          
+              chmod +x $out/bin/$(basename $i)
+        fi
+    done
+  '';
+  
+  buildInputs = [ unzip makeWrapper ];
+}
diff --git a/pkgs/development/mobile/androidenv/build-app.nix b/pkgs/development/mobile/androidenv/build-app.nix
new file mode 100644
index 00000000000..571cd2be623
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/build-app.nix
@@ -0,0 +1,41 @@
+{ stdenv, androidsdk, jdk, ant }:
+{ name, src, platformVersions ? [ "8" ], useGoogleAPIs ? false
+, release ? false, keyStore ? null, keyAlias ? null, keyStorePassword ? null, keyAliasPassword ? null
+}:
+
+assert release -> keyStore != null && keyAlias != null && keyStorePassword != null && keyAliasPassword != null;
+
+let
+  platformName = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then "linux"
+    else if stdenv.system == "x86_64-darwin" then "macosx"
+    else throw "Platform: ${stdenv.system} is not supported!";
+
+  androidsdkComposition = androidsdk { inherit platformVersions useGoogleAPIs; };
+in
+stdenv.mkDerivation {
+  inherit name src;
+  
+  ANDROID_HOME = "${androidsdkComposition}/libexec/android-sdk-${platformName}";
+
+  buildInputs = [ jdk ant ];
+  
+  buildPhase = ''
+    ${stdenv.lib.optionalString release ''
+    
+      # Provide key singing attributes
+      ( echo "key.store=${keyStore}"
+        echo "key.alias=${keyAlias}"
+        echo "key.store.password=${keyStorePassword}"
+        echo "key.alias.password=${keyAliasPassword}"
+      ) >> ant.properties
+    ''}
+  
+    export ANDROID_SDK_HOME=`pwd` # Key files cannot be stored in the user's home directory. This overrides it.
+    ant ${if release then "release" else "debug"}
+  '';
+  
+  installPhase = ''
+    mkdir -p $out
+    mv bin/*-${if release then "release" else "debug"}.apk $out
+  '';
+}
diff --git a/pkgs/development/mobile/androidenv/default.nix b/pkgs/development/mobile/androidenv/default.nix
new file mode 100644
index 00000000000..a76deb98b6e
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/default.nix
@@ -0,0 +1,62 @@
+{pkgs, pkgs_i686}:
+
+rec {
+  platformTools = import ./platform-tools.nix {
+    inherit (pkgs) stdenv fetchurl unzip;
+    inherit (pkgs_i686) zlib ncurses;
+    stdenv_32bit = pkgs_i686.stdenv;
+  };
+  
+  support = import ./support.nix {
+    inherit (pkgs) stdenv fetchurl unzip;
+  };
+  
+  platforms = if (pkgs.stdenv.system == "i686-linux" || pkgs.stdenv.system == "x86_64-linux")
+    then import ./platforms-linux.nix {
+      inherit (pkgs) stdenv fetchurl unzip;
+    }
+    else if pkgs.stdenv.system == "x86_64-darwin"
+    then import ./platforms-macosx.nix {
+      inherit (pkgs) stdenv fetchurl unzip;
+    }
+    else throw "Platform: ${pkgs.stdenv.system} not supported!";
+
+  sysimages = import ./sysimages.nix {
+    inherit (pkgs) stdenv fetchurl unzip;
+  };
+
+  addons = import ./addons.nix {
+    inherit (pkgs) stdenv fetchurl unzip;
+  };
+
+  androidsdk = import ./androidsdk.nix {
+    inherit (pkgs) stdenv fetchurl unzip makeWrapper;
+    inherit (pkgs) freetype fontconfig gtk atk;
+    inherit (pkgs.xorg) libX11 libXext libXrender libxcb libXau libXdmcp;
+    
+    inherit platformTools support platforms sysimages addons;
+    
+    stdenv_32bit = pkgs_i686.stdenv;
+    zlib_32bit = pkgs_i686.zlib;
+    libX11_32bit = pkgs_i686.xorg.libX11;
+    libxcb_32bit = pkgs_i686.xorg.libxcb;
+    libXau_32bit = pkgs_i686.xorg.libXau;
+    libXdmcp_32bit = pkgs_i686.xorg.libXdmcp;
+    libXext_32bit = pkgs_i686.xorg.libXext;
+  };
+  
+  androidsdk_4_1 = androidsdk {
+    platformVersions = [ "16" ];
+    useGoogleAPIs = true;
+  };
+  
+  buildApp = import ./build-app.nix {
+    inherit (pkgs) stdenv jdk ant;
+    inherit androidsdk;
+  };
+  
+  emulateApp = import ./emulate-app.nix {
+    inherit (pkgs) stdenv;
+    inherit androidsdk;
+  };
+}
diff --git a/pkgs/development/mobile/androidenv/emulate-app.nix b/pkgs/development/mobile/androidenv/emulate-app.nix
new file mode 100644
index 00000000000..3cbe5723806
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/emulate-app.nix
@@ -0,0 +1,87 @@
+{stdenv, androidsdk}:
+{name, app, platformVersion ? "8", useGoogleAPIs ? false, package, activity}:
+
+let
+  androidsdkComposition = androidsdk { inherit useGoogleAPIs; platformVersions = [ platformVersion ]; };
+in
+stdenv.mkDerivation {
+  inherit name;
+  
+  buildCommand = ''
+    mkdir -p $out/bin
+    
+    cat > $out/bin/run-test-emulator << "EOF"
+    #!/bin/sh -e
+    
+    # We need a TMPDIR
+    if [ "$TMPDIR" = "" ]
+    then
+        export TMPDIR=/tmp
+    fi
+    
+    # Store the virtual devices somewhere else, instead of polluting a user's HOME directory
+    export ANDROID_SDK_HOME=$(mktemp -d $TMPDIR/nix-android-vm-XXXX)
+    
+    # We have to look for a free TCP port
+    
+    echo "Looking for a free TCP port in range 5554-5584"
+    
+    for i in $(seq 5554 2 5584)
+    do
+        if [ -z "$(${androidsdkComposition}/libexec/android-sdk-*/platform-tools/adb devices | grep emulator-$i)" ]
+        then
+            port=$i
+            break
+        fi
+    done
+    
+    if [ -z "$port" ]
+    then
+        echo "Unfortunately, the emulator port space is exhausted!"
+        exit 1
+    else
+        echo "We have a free TCP port: $port"
+    fi
+    
+    export ANDROID_SERIAL="emulator-$port"
+    
+    # Create a virtual android device
+    ${androidsdkComposition}/libexec/android-sdk-*/tools/android create avd -n device -t ${if useGoogleAPIs then "'Google Inc.:Google APIs:"+platformVersion+"'" else "android-"+platformVersion}
+    
+    # Launch the emulator
+    ${androidsdkComposition}/libexec/android-sdk-*/tools/emulator -avd device -no-boot-anim -port $port &
+
+    # Wait until the device has completely booted
+    
+    echo "Waiting until the emulator has booted the device and the package manager is ready..."
+    
+    ${androidsdkComposition}/libexec/android-sdk-*/platform-tools/adb -s emulator-$port wait-for-device
+    
+    echo "Device state has been reached"
+    
+    while [ -z "$(${androidsdkComposition}/libexec/android-sdk-*/platform-tools/adb -s emulator-$port shell getprop dev.bootcomplete | grep 1)" ]
+    do
+        sleep 5
+    done
+    
+    echo "dev.bootcomplete property is 1"
+    
+    #while [ -z "$(${androidsdkComposition}/libexec/android-sdk-*/platform-tools/adb -s emulator-$port shell getprop sys.boot_completed | grep 1)" ]
+    #do
+        #sleep 5
+    #done
+    
+    #echo "sys.boot_completed property is 1"
+    
+    echo "ready"
+    
+    # Install the App through the debugger
+    ${androidsdkComposition}/libexec/android-sdk-*/platform-tools/adb -s emulator-$port install ${app}/*.apk
+    
+    # Start the application
+    ${androidsdkComposition}/libexec/android-sdk-*/platform-tools/adb -s emulator-$port shell am start -a android.intent.action.MAIN -n ${package}/.${activity}
+    EOF
+    
+    chmod +x $out/bin/run-test-emulator
+  '';
+}
diff --git a/pkgs/development/mobile/androidenv/generate-addons.sh b/pkgs/development/mobile/androidenv/generate-addons.sh
new file mode 100755
index 00000000000..9b2cf34eabc
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generate-addons.sh
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+xsltproc generate-addons.xsl addon.xml > addons.nix
diff --git a/pkgs/development/mobile/androidenv/generate-addons.xsl b/pkgs/development/mobile/androidenv/generate-addons.xsl
new file mode 100644
index 00000000000..0100b980a4e
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generate-addons.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:sdk="http://schemas.android.com/sdk/android/addon/5">
+
+  <xsl:output omit-xml-declaration="yes" indent="no" />
+  <xsl:template match="/sdk:sdk-addon">
+{stdenv, fetchurl, unzip}:
+
+let
+  buildGoogleApis = args:
+    stdenv.mkDerivation (args // {
+      buildInputs = [ unzip ];
+      buildCommand = ''
+        mkdir -p $out
+        cd $out
+        unzip $src
+      '';
+    });
+in
+{
+    <xsl:for-each select="sdk:add-on[sdk:name-id='google_apis']">
+  google_apis_<xsl:value-of select="sdk:api-level" /> = buildGoogleApis {
+    name = "<xsl:value-of select="sdk:name-id" />-<xsl:value-of select="sdk:api-level" />";
+      src = fetchurl {
+        url = https://dl-ssl.google.com/android/repository/<xsl:value-of select="sdk:archives/sdk:archive[@os='any']/sdk:url" />;
+        sha1 = "<xsl:value-of select="sdk:archives/sdk:archive[@os='any']/sdk:checksum[@type='sha1']" />";
+      };
+      meta = {
+        description = "<xsl:value-of select="sdk:description" />";
+        <xsl:for-each select="sdk:desc-url">url = <xsl:value-of select="." />;</xsl:for-each>
+      };
+    };
+    </xsl:for-each>
+}
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/pkgs/development/mobile/androidenv/generate-platforms.sh b/pkgs/development/mobile/androidenv/generate-platforms.sh
new file mode 100755
index 00000000000..983d8bde87b
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generate-platforms.sh
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+
+xsltproc --stringparam os linux generate-platforms.xsl repository-7.xml > platforms-linux.nix
+xsltproc --stringparam os macosx generate-platforms.xsl repository-7.xml > platforms-macosx.nix
diff --git a/pkgs/development/mobile/androidenv/generate-platforms.xsl b/pkgs/development/mobile/androidenv/generate-platforms.xsl
new file mode 100644
index 00000000000..1802ae63efe
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generate-platforms.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:sdk="http://schemas.android.com/sdk/android/repository/7">
+
+  <xsl:param name="os" />
+  <xsl:output omit-xml-declaration="yes" indent="no" />
+  <xsl:template match="/sdk:sdk-repository">
+{stdenv, fetchurl, unzip}:
+
+let
+  buildPlatform = args:
+    stdenv.mkDerivation (args // {   
+      buildInputs = [ unzip ];
+      buildCommand = ''
+        mkdir -p $out
+        cd $out
+        unzip $src
+    '';
+  });
+in
+{
+    <xsl:for-each select="sdk:platform">
+  platform_<xsl:value-of select="sdk:api-level" /> = buildPlatform {
+    name = "android-platform-<xsl:value-of select="sdk:version" />";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/<xsl:value-of select="sdk:archives/sdk:archive[@os=$os or @os='any']/sdk:url" />;
+      sha1 = "<xsl:value-of select="sdk:archives/sdk:archive[@os=$os or @os='any']/sdk:checksum[@type='sha1']" />";
+    };
+    meta = {
+      description = "<xsl:value-of select="sdk:description" />";
+      <xsl:for-each select="sdk:desc-url">url = <xsl:value-of select="." />;</xsl:for-each>
+    };
+  };
+    </xsl:for-each>
+}
+  </xsl:template>
+</xsl:stylesheet>
diff --git a/pkgs/development/mobile/androidenv/generate-sysimages.sh b/pkgs/development/mobile/androidenv/generate-sysimages.sh
new file mode 100755
index 00000000000..dc28c27f45f
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generate-sysimages.sh
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+xsltproc generate-sysimages.xsl repository-7.xml > sysimages.nix
diff --git a/pkgs/development/mobile/androidenv/generate-sysimages.xsl b/pkgs/development/mobile/androidenv/generate-sysimages.xsl
new file mode 100644
index 00000000000..1224ebbd4e8
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generate-sysimages.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:str="http://exslt.org/strings"
+  xmlns:sdk="http://schemas.android.com/sdk/android/repository/7">
+
+  <xsl:output omit-xml-declaration="yes" indent="no" />
+
+  <xsl:template match="/sdk:sdk-repository">
+{stdenv, fetchurl, unzip}:
+
+let
+  buildSystemImage = args:
+    stdenv.mkDerivation (args // {   
+      buildInputs = [ unzip ];
+      buildCommand = ''
+        mkdir -p $out
+        cd $out
+        unzip $src
+    '';
+  });
+in
+{
+    <xsl:for-each select="sdk:system-image">
+  sysimg_<xsl:value-of select="sdk:api-level" /> = buildSystemImage {
+    name = "<xsl:value-of select="sdk:abi" />-<xsl:value-of select="sdk:api-level" />";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/<xsl:value-of select="sdk:archives/sdk:archive[@os='any']/sdk:url" />;
+      sha1 = "<xsl:value-of select="sdk:archives/sdk:archive[@os='any']/sdk:checksum[@type='sha1']" />";
+    };
+  };
+    </xsl:for-each>
+}
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/pkgs/development/mobile/androidenv/platform-tools.nix b/pkgs/development/mobile/androidenv/platform-tools.nix
new file mode 100644
index 00000000000..55499608290
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/platform-tools.nix
@@ -0,0 +1,41 @@
+{stdenv, stdenv_32bit, fetchurl, unzip, zlib, ncurses}:
+
+stdenv.mkDerivation {
+  name = "android-platform-tools-r16";
+  src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
+    then fetchurl {
+      url = https://dl-ssl.google.com/android/repository/platform-tools_r16-linux.zip;
+      sha1 = "84d563ae5e324f223f335f11bf511bf6207c05fb";
+    }
+    else if stdenv.system == "x86_64-darwin" then fetchurl {
+      url = https://dl-ssl.google.com/android/repository/platform-tools_r16-macosx.zip;
+      sha1 = "fbb0f8d2786a83b8c3eb6df402e706e136db8fed";
+    }
+    else throw "System ${stdenv.system} not supported!";
+  
+  buildCommand = ''
+    mkdir -p $out
+    cd $out
+    unzip $src
+    cd platform-tools
+    
+    ${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
+      ''
+        for i in aapt adb aidl dexdump fastboot llvm-rs-cc
+        do
+            patchelf --set-interpreter ${stdenv_32bit.gcc.libc}/lib/ld-linux.so.2 $i
+        done
+    
+        patchelf --set-rpath ${zlib}/lib:${stdenv_32bit.gcc.gcc}/lib aapt
+        patchelf --set-rpath ${ncurses}/lib:${stdenv_32bit.gcc.gcc}/lib adb
+        patchelf --set-rpath ${stdenv_32bit.gcc.gcc}/lib aidl
+        patchelf --set-rpath ${stdenv_32bit.gcc.gcc}/lib fastboot
+        patchelf --set-rpath ${zlib}/lib:${stdenv_32bit.gcc.gcc}/lib dexdump
+        patchelf --set-rpath ${stdenv_32bit.gcc.gcc}/lib llvm-rs-cc
+    ''}
+    
+    patchShebangs .
+  '';
+  
+  buildInputs = [ unzip ];
+}
diff --git a/pkgs/development/mobile/androidenv/platforms-linux.nix b/pkgs/development/mobile/androidenv/platforms-linux.nix
new file mode 100644
index 00000000000..f544fcc08be
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/platforms-linux.nix
@@ -0,0 +1,210 @@
+
+{stdenv, fetchurl, unzip}:
+
+let
+  buildPlatform = args:
+    stdenv.mkDerivation (args // {   
+      buildInputs = [ unzip ];
+      buildCommand = ''
+        mkdir -p $out
+        cd $out
+        unzip $src
+    '';
+  });
+in
+{
+    
+  platform_2 = buildPlatform {
+    name = "android-platform-1.1";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-1.1_r1-linux.zip;
+      sha1 = "c054d25c9b4c6251fa49c2f9c54336998679d3fe";
+    };
+    meta = {
+      description = "Android SDK Platform 1.1_r1";
+      url = http://developer.android.com/sdk/android-1.1.html;
+    };
+  };
+    
+  platform_3 = buildPlatform {
+    name = "android-platform-1.5";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-1.5_r04-linux.zip;
+      sha1 = "5c134b7df5f4b8bd5b61ba93bdaebada8fa3468c";
+    };
+    meta = {
+      description = "Android SDK Platform 1.5_r3";
+      url = http://developer.android.com/sdk/android-1.5.html;
+    };
+  };
+    
+  platform_4 = buildPlatform {
+    name = "android-platform-1.6";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-1.6_r03-linux.zip;
+      sha1 = "483ed088e45bbdf3444baaf9250c8b02e5383cb0";
+    };
+    meta = {
+      description = "Android SDK Platform 1.6_r2";
+      url = http://developer.android.com/sdk/android-1.6.html;
+    };
+  };
+    
+  platform_5 = buildPlatform {
+    name = "android-platform-2.0";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-2.0_r01-linux.zip;
+      sha1 = "be9be6a99ca32875c96ec7f91160ca9fce7e3c7d";
+    };
+    meta = {
+      description = "Android SDK Platform 2.0, revision 1";
+      url = http://developer.android.com/sdk/android-2.0.html;
+    };
+  };
+    
+  platform_6 = buildPlatform {
+    name = "android-platform-2.0.1";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-2.0.1_r01-linux.zip;
+      sha1 = "ce2c971dce352aa28af06bda92a070116aa5ae1a";
+    };
+    meta = {
+      description = "Android SDK Platform 2.0.1_r1";
+      url = http://developer.android.com/sdk/android-2.0.1.html;
+    };
+  };
+    
+  platform_7 = buildPlatform {
+    name = "android-platform-2.1";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-2.1_r03-linux.zip;
+      sha1 = "5ce51b023ac19f8738500b1007a1da5de2349a1e";
+    };
+    meta = {
+      description = "Android SDK Platform 2.1_r3";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_8 = buildPlatform {
+    name = "android-platform-2.2";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-2.2_r03-linux.zip;
+      sha1 = "231262c63eefdff8fd0386e9ccfefeb27a8f9202";
+    };
+    meta = {
+      description = "Android SDK Platform 2.2_r3";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_9 = buildPlatform {
+    name = "android-platform-2.3.1";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-2.3.1_r02-linux.zip;
+      sha1 = "209f8a7a8b2cb093fce858b8b55fed3ba5206773";
+    };
+    meta = {
+      description = "Android SDK Platform 2.3.1_r2";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_10 = buildPlatform {
+    name = "android-platform-2.3.3";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-2.3.3_r02-linux.zip;
+      sha1 = "887e37783ec32f541ea33c2c649dda648e8e6fb3";
+    };
+    meta = {
+      description = "Android SDK Platform 2.3.3._r2";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_11 = buildPlatform {
+    name = "android-platform-3.0";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-3.0_r02-linux.zip;
+      sha1 = "2c7d4bd13f276e76f6bbd87315fe27aba351dd37";
+    };
+    meta = {
+      description = "Android SDK Platform 3.0, revision 2";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_12 = buildPlatform {
+    name = "android-platform-3.1";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-3.1_r03-linux.zip;
+      sha1 = "4a50a6679cd95bb68bb5fc032e754cd7c5e2b1bf";
+    };
+    meta = {
+      description = "Android SDK Platform 3.1, revision 3";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_13 = buildPlatform {
+    name = "android-platform-3.2";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-3.2_r01-linux.zip;
+      sha1 = "6189a500a8c44ae73a439604363de93591163cd9";
+    };
+    meta = {
+      description = "Android SDK Platform 3.2, revision 1";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_14 = buildPlatform {
+    name = "android-platform-4.0";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-14_r03.zip;
+      sha1 = "41ba83b51e886461628c41b1b4d47762e0688ed5";
+    };
+    meta = {
+      description = "Android SDK Platform 4.0";
+      
+    };
+  };
+    
+  platform_15 = buildPlatform {
+    name = "android-platform-4.0.3";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-15_r03.zip;
+      sha1 = "23da24610a8da51054c5391001c51ce43a778b97";
+    };
+    meta = {
+      description = "Android SDK Platform 4.0.3";
+      
+    };
+  };
+    
+  platform_16 = buildPlatform {
+    name = "android-platform-4.1.2";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-16_r03.zip;
+      sha1 = "80d9ffef58168f9bccd862830e2ee51f686b167e";
+    };
+    meta = {
+      description = "Android SDK Platform 4.1";
+      
+    };
+  };
+    
+  platform_17 = buildPlatform {
+    name = "android-platform-4.2";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-17_r01.zip;
+      sha1 = "c2e7c8c8db40e06b804ddb1725ac2c3555b55025";
+    };
+    meta = {
+      description = "Android SDK Platform 4.2";
+      
+    };
+  };
+    
+}
+  
\ No newline at end of file
diff --git a/pkgs/development/mobile/androidenv/platforms-macosx.nix b/pkgs/development/mobile/androidenv/platforms-macosx.nix
new file mode 100644
index 00000000000..a1434bbe56c
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/platforms-macosx.nix
@@ -0,0 +1,210 @@
+
+{stdenv, fetchurl, unzip}:
+
+let
+  buildPlatform = args:
+    stdenv.mkDerivation (args // {   
+      buildInputs = [ unzip ];
+      buildCommand = ''
+        mkdir -p $out
+        cd $out
+        unzip $src
+    '';
+  });
+in
+{
+    
+  platform_2 = buildPlatform {
+    name = "android-platform-1.1";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-1.1_r1-macosx.zip;
+      sha1 = "e21dbcff45b7356657449ebb3c7e941be2bb5ebe";
+    };
+    meta = {
+      description = "Android SDK Platform 1.1_r1";
+      url = http://developer.android.com/sdk/android-1.1.html;
+    };
+  };
+    
+  platform_3 = buildPlatform {
+    name = "android-platform-1.5";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-1.5_r04-macosx.zip;
+      sha1 = "d3a67c2369afa48b6c3c7624de5031c262018d1e";
+    };
+    meta = {
+      description = "Android SDK Platform 1.5_r3";
+      url = http://developer.android.com/sdk/android-1.5.html;
+    };
+  };
+    
+  platform_4 = buildPlatform {
+    name = "android-platform-1.6";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-1.6_r03-macosx.zip;
+      sha1 = "bdafad44f5df9f127979bdb21a1fdd87ee3cd625";
+    };
+    meta = {
+      description = "Android SDK Platform 1.6_r2";
+      url = http://developer.android.com/sdk/android-1.6.html;
+    };
+  };
+    
+  platform_5 = buildPlatform {
+    name = "android-platform-2.0";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-2.0_r01-macosx.zip;
+      sha1 = "2a866d0870dbba18e0503cd41e5fae988a21b314";
+    };
+    meta = {
+      description = "Android SDK Platform 2.0, revision 1";
+      url = http://developer.android.com/sdk/android-2.0.html;
+    };
+  };
+    
+  platform_6 = buildPlatform {
+    name = "android-platform-2.0.1";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-2.0.1_r01-macosx.zip;
+      sha1 = "c3096f80d75a6fc8cb38ef8a18aec920e53d42c0";
+    };
+    meta = {
+      description = "Android SDK Platform 2.0.1_r1";
+      url = http://developer.android.com/sdk/android-2.0.1.html;
+    };
+  };
+    
+  platform_7 = buildPlatform {
+    name = "android-platform-2.1";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-2.1_r03-linux.zip;
+      sha1 = "5ce51b023ac19f8738500b1007a1da5de2349a1e";
+    };
+    meta = {
+      description = "Android SDK Platform 2.1_r3";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_8 = buildPlatform {
+    name = "android-platform-2.2";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-2.2_r03-linux.zip;
+      sha1 = "231262c63eefdff8fd0386e9ccfefeb27a8f9202";
+    };
+    meta = {
+      description = "Android SDK Platform 2.2_r3";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_9 = buildPlatform {
+    name = "android-platform-2.3.1";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-2.3.1_r02-linux.zip;
+      sha1 = "209f8a7a8b2cb093fce858b8b55fed3ba5206773";
+    };
+    meta = {
+      description = "Android SDK Platform 2.3.1_r2";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_10 = buildPlatform {
+    name = "android-platform-2.3.3";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-2.3.3_r02-linux.zip;
+      sha1 = "887e37783ec32f541ea33c2c649dda648e8e6fb3";
+    };
+    meta = {
+      description = "Android SDK Platform 2.3.3._r2";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_11 = buildPlatform {
+    name = "android-platform-3.0";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-3.0_r02-linux.zip;
+      sha1 = "2c7d4bd13f276e76f6bbd87315fe27aba351dd37";
+    };
+    meta = {
+      description = "Android SDK Platform 3.0, revision 2";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_12 = buildPlatform {
+    name = "android-platform-3.1";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-3.1_r03-linux.zip;
+      sha1 = "4a50a6679cd95bb68bb5fc032e754cd7c5e2b1bf";
+    };
+    meta = {
+      description = "Android SDK Platform 3.1, revision 3";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_13 = buildPlatform {
+    name = "android-platform-3.2";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-3.2_r01-linux.zip;
+      sha1 = "6189a500a8c44ae73a439604363de93591163cd9";
+    };
+    meta = {
+      description = "Android SDK Platform 3.2, revision 1";
+      url = http://developer.android.com/sdk/;
+    };
+  };
+    
+  platform_14 = buildPlatform {
+    name = "android-platform-4.0";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-14_r03.zip;
+      sha1 = "41ba83b51e886461628c41b1b4d47762e0688ed5";
+    };
+    meta = {
+      description = "Android SDK Platform 4.0";
+      
+    };
+  };
+    
+  platform_15 = buildPlatform {
+    name = "android-platform-4.0.3";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-15_r03.zip;
+      sha1 = "23da24610a8da51054c5391001c51ce43a778b97";
+    };
+    meta = {
+      description = "Android SDK Platform 4.0.3";
+      
+    };
+  };
+    
+  platform_16 = buildPlatform {
+    name = "android-platform-4.1.2";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-16_r03.zip;
+      sha1 = "80d9ffef58168f9bccd862830e2ee51f686b167e";
+    };
+    meta = {
+      description = "Android SDK Platform 4.1";
+      
+    };
+  };
+    
+  platform_17 = buildPlatform {
+    name = "android-platform-4.2";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/android-17_r01.zip;
+      sha1 = "c2e7c8c8db40e06b804ddb1725ac2c3555b55025";
+    };
+    meta = {
+      description = "Android SDK Platform 4.2";
+      
+    };
+  };
+    
+}
+  
\ No newline at end of file
diff --git a/pkgs/development/mobile/androidenv/repository-7.xml b/pkgs/development/mobile/androidenv/repository-7.xml
new file mode 100644
index 00000000000..7bbbaf1e362
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/repository-7.xml
@@ -0,0 +1,1030 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<sdk:sdk-repository xmlns:sdk="http://schemas.android.com/sdk/android/repository/7" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+    <sdk:license id="android-sdk-license" type="text">Terms and Conditions
+
+This is the Android Software Development Kit License Agreement.
+
+
+1. Introduction
+
+
+1.1 The Android Software Development Kit (referred to in this License Agreement as the &quot;SDK&quot; and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK.
+
+1.2 &quot;Android&quot; means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
+
+1.3 &quot;Google&quot; means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
+
+
+2. Accepting this License Agreement
+
+
+2.1 In order to use the SDK, you must first agree to this License Agreement. You may not use the SDK if you do not accept this License Agreement.
+
+2.2 By clicking to accept, you hereby agree to the terms of this License Agreement.
+
+2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries including the country in which you are resident or from which you use the SDK.
+
+2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.
+
+
+3. SDK License from Google
+
+
+3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable and non-exclusive license to use the SDK solely to develop applications to run on the Android platform.
+
+3.2 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. &quot;Intellectual Property Rights&quot; means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
+
+3.3 You may not use the SDK for any purpose not expressly permitted by this License Agreement.  Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK.
+
+3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the SDK.
+
+3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement.
+
+3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you.
+
+3.7 Nothing in this License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
+
+3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.
+
+
+4. Use of the SDK by You
+
+
+4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
+
+4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) this License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
+
+4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
+
+4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier.
+
+4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
+
+4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
+
+
+5. Your Developer Credentials
+
+
+5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
+
+
+6. Privacy and Information
+
+
+6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected.
+
+6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy.
+
+
+7. Third Party Applications
+
+
+7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
+
+7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
+
+7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties.
+
+
+8. Using Android APIs
+
+
+8.1 Google Data APIs
+
+8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
+
+8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
+
+
+9. Terminating this License Agreement
+
+
+9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
+
+9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials.
+
+9.3 Google may at any time, terminate this License Agreement with you if:
+(A) you have breached any provision of this License Agreement; or
+(B) Google is required to do so by law; or
+(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
+(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
+
+9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
+
+
+10. DISCLAIMER OF WARRANTIES
+
+
+10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED &quot;AS IS&quot; AND &quot;AS AVAILABLE&quot; WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
+
+10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
+
+10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+
+
+11. LIMITATION OF LIABILITY
+
+
+11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
+
+
+12. Indemnification
+
+
+12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement.
+
+
+13. Changes to the License Agreement
+
+
+13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
+
+
+14. General Legal Terms
+
+
+14.1 This License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK.
+
+14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
+
+14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.
+
+14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.
+
+14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
+
+14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.
+
+14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
+
+November 13, 2012
+    </sdk:license>
+
+    <!-- PLATFORMS ........................ -->
+
+    <sdk:platform>
+        <sdk:version>1.1</sdk:version>
+        <sdk:api-level>2</sdk:api-level>
+        <sdk:revision>1</sdk:revision>
+        <sdk:description>Android SDK Platform 1.1_r1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/android-1.1.html</sdk:desc-url>
+        <sdk:obsolete/>
+        <sdk:archives>
+            <sdk:archive arch="any" os="windows">
+                <sdk:size>46828615</sdk:size>
+                <sdk:checksum type="sha1">a4060f29ed39fc929c302836d488998c53c3002e</sdk:checksum>
+                <sdk:url>android-1.1_r1-windows.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="macosx">
+                <sdk:size>45584305</sdk:size>
+                <sdk:checksum type="sha1">e21dbcff45b7356657449ebb3c7e941be2bb5ebe</sdk:checksum>
+                <sdk:url>android-1.1_r1-macosx.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="linux">
+                <sdk:size>45476658</sdk:size>
+                <sdk:checksum type="sha1">c054d25c9b4c6251fa49c2f9c54336998679d3fe</sdk:checksum>
+                <sdk:url>android-1.1_r1-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:layoutlib>
+            <sdk:api>4</sdk:api>
+        </sdk:layoutlib>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <!-- Generated manually from earlier versions -->
+
+    <sdk:platform>
+        <sdk:version>1.5</sdk:version>
+        <sdk:api-level>3</sdk:api-level>
+        <sdk:revision>04</sdk:revision>
+        <sdk:min-tools-rev>
+            <sdk:major>6</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:description>Android SDK Platform 1.5_r3</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/android-1.5.html</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="windows">
+                <sdk:size>54624370</sdk:size>
+                <sdk:checksum type="sha1">5bb106d2e40d481edd337b0833093843e15fe49a</sdk:checksum>
+                <sdk:url>android-1.5_r04-windows.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="macosx">
+                <sdk:size>52440607</sdk:size>
+                <sdk:checksum type="sha1">d3a67c2369afa48b6c3c7624de5031c262018d1e</sdk:checksum>
+                <sdk:url>android-1.5_r04-macosx.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="linux">
+                <sdk:size>53348669</sdk:size>
+                <sdk:checksum type="sha1">5c134b7df5f4b8bd5b61ba93bdaebada8fa3468c</sdk:checksum>
+                <sdk:url>android-1.5_r04-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:layoutlib>
+            <sdk:api>4</sdk:api>
+        </sdk:layoutlib>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <sdk:platform>
+        <sdk:version>1.6</sdk:version>
+        <sdk:api-level>4</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>03</sdk:revision>
+        <sdk:min-tools-rev>
+            <sdk:major>6</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:description>Android SDK Platform 1.6_r2</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/android-1.6.html</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="linux">
+                <sdk:size>63454485</sdk:size>
+                <sdk:checksum type="sha1">483ed088e45bbdf3444baaf9250c8b02e5383cb0</sdk:checksum>
+                <sdk:url>android-1.6_r03-linux.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="macosx">
+                <sdk:size>62418496</sdk:size>
+                <sdk:checksum type="sha1">bdafad44f5df9f127979bdb21a1fdd87ee3cd625</sdk:checksum>
+                <sdk:url>android-1.6_r03-macosx.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="windows">
+                <sdk:size>64654625</sdk:size>
+                <sdk:checksum type="sha1">ce0b5e4ffaf12ca4fd07c2da71a8a1ab4a03dc22</sdk:checksum>
+                <sdk:url>android-1.6_r03-windows.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:layoutlib>
+            <sdk:api>4</sdk:api>
+        </sdk:layoutlib>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <!-- Generated on Thu Oct 22 10:16:34 PDT 2009 using eclair-sdk 17704: Platform. Addon. Tools. Doc. -->
+
+    <sdk:platform>
+        <sdk:version>2.0</sdk:version>
+        <sdk:api-level>5</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>01</sdk:revision>
+        <sdk:min-tools-rev>
+            <sdk:major>3</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:description>Android SDK Platform 2.0, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/android-2.0.html</sdk:desc-url>
+        <sdk:obsolete/>
+        <sdk:archives>
+            <sdk:archive arch="any" os="linux">
+                <sdk:size>75095268</sdk:size>
+                <sdk:checksum type="sha1">be9be6a99ca32875c96ec7f91160ca9fce7e3c7d</sdk:checksum>
+                <sdk:url>android-2.0_r01-linux.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="macosx">
+                <sdk:size>74956356</sdk:size>
+                <sdk:checksum type="sha1">2a866d0870dbba18e0503cd41e5fae988a21b314</sdk:checksum>
+                <sdk:url>android-2.0_r01-macosx.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="windows">
+                <sdk:size>76288040</sdk:size>
+                <sdk:checksum type="sha1">aeb623217ff88b87216d6eb7dbc846ed53f68f57</sdk:checksum>
+                <sdk:url>android-2.0_r01-windows.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:layoutlib>
+            <sdk:api>4</sdk:api>
+        </sdk:layoutlib>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <!-- Generated on Mon Nov 23 14:08:02 PST 2009 using eclair-release 20723: Platform. Addon. -->
+
+    <sdk:platform>
+        <sdk:version>2.0.1</sdk:version>
+        <sdk:api-level>6</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>01</sdk:revision>
+        <sdk:min-tools-rev>
+            <sdk:major>4</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:description>Android SDK Platform 2.0.1_r1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/android-2.0.1.html</sdk:desc-url>
+        <sdk:obsolete/>
+        <sdk:archives>
+            <sdk:archive arch="any" os="linux">
+                <sdk:size>79192618</sdk:size>
+                <sdk:checksum type="sha1">ce2c971dce352aa28af06bda92a070116aa5ae1a</sdk:checksum>
+                <sdk:url>android-2.0.1_r01-linux.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="macosx">
+                <sdk:size>79035527</sdk:size>
+                <sdk:checksum type="sha1">c3096f80d75a6fc8cb38ef8a18aec920e53d42c0</sdk:checksum>
+                <sdk:url>android-2.0.1_r01-macosx.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="windows">
+                <sdk:size>80385601</sdk:size>
+                <sdk:checksum type="sha1">255781ebe4509d9707d0e77edda2815e2bc216e6</sdk:checksum>
+                <sdk:url>android-2.0.1_r01-windows.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:layoutlib>
+            <sdk:api>4</sdk:api>
+        </sdk:layoutlib>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <!-- Generated on Thu May  6 15:57:41 PDT 2010 using eclair 35983: Platform. -->
+
+    <sdk:platform>
+        <sdk:version>2.1</sdk:version>
+        <sdk:api-level>7</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>03</sdk:revision>
+        <sdk:min-tools-rev>
+            <sdk:major>8</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:description>Android SDK Platform 2.1_r3</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>70142829</sdk:size>
+                <sdk:checksum type="sha1">5ce51b023ac19f8738500b1007a1da5de2349a1e</sdk:checksum>
+                <sdk:url>android-2.1_r03-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:layoutlib>
+            <sdk:api>4</sdk:api>
+        </sdk:layoutlib>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <!-- Generated on Wed Jun 30 16:13:06 PDT 2010 using froyo-release 43546: Platform. Addon. -->
+
+    <sdk:platform>
+        <sdk:version>2.2</sdk:version>
+        <sdk:api-level>8</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>03</sdk:revision>
+        <sdk:min-tools-rev>
+            <sdk:major>8</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:description>Android SDK Platform 2.2_r3</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>74652366</sdk:size>
+                <sdk:checksum type="sha1">231262c63eefdff8fd0386e9ccfefeb27a8f9202</sdk:checksum>
+                <sdk:url>android-2.2_r03-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:layoutlib>
+            <sdk:api>4</sdk:api>
+        </sdk:layoutlib>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <!-- Generated on Thu Jan 20 09:40:59 PST 2011 using gingerbread-sdk-release 93351: Platform. -->
+
+    <sdk:platform>
+        <sdk:version>2.3.1</sdk:version>
+        <sdk:api-level>9</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>02</sdk:revision>
+        <sdk:min-tools-rev>
+            <sdk:major>8</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:description>Android SDK Platform 2.3.1_r2</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:obsolete/>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>78732563</sdk:size>
+                <sdk:checksum type="sha1">209f8a7a8b2cb093fce858b8b55fed3ba5206773</sdk:checksum>
+                <sdk:url>android-2.3.1_r02-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:layoutlib>
+            <sdk:api>4</sdk:api>
+        </sdk:layoutlib>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <!-- Generated on Fri Feb  4 16:41:27 PST 2011 using gingerbread-release 101070: Platform. -->
+
+    <sdk:platform>
+        <sdk:version>2.3.3</sdk:version>
+        <sdk:api-level>10</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>02</sdk:revision>
+        <sdk:min-tools-rev>
+            <sdk:major>8</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:description>Android SDK Platform 2.3.3._r2</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>85470907</sdk:size>
+                <sdk:checksum type="sha1">887e37783ec32f541ea33c2c649dda648e8e6fb3</sdk:checksum>
+                <sdk:url>android-2.3.3_r02-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:layoutlib>
+            <sdk:api>4</sdk:api>
+        </sdk:layoutlib>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <!-- Generated on Thu Feb 17 08:41:10 PST 2011 using honeycomb 104254: Platform. -->
+
+    <sdk:platform>
+        <sdk:version>3.0</sdk:version>
+        <sdk:api-level>11</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>02</sdk:revision>
+        <sdk:min-tools-rev>
+            <sdk:major>10</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:description>Android SDK Platform 3.0, revision 2</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>104513908</sdk:size>
+                <sdk:checksum type="sha1">2c7d4bd13f276e76f6bbd87315fe27aba351dd37</sdk:checksum>
+                <sdk:url>android-3.0_r02-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:layoutlib>
+            <sdk:api>4</sdk:api>
+        </sdk:layoutlib>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <!-- Generated on Wed May  4 19:39:17 PDT 2011 using honeycomb-mr1 123685: Platform.
+         r2: layoutlib.jar from 3.0 to fix issue with ADT 10.
+    -->
+
+    <sdk:platform>
+        <sdk:version>3.1</sdk:version>
+        <sdk:api-level>12</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>03</sdk:revision>
+        <sdk:min-tools-rev>
+            <sdk:major>11</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:description>Android SDK Platform 3.1, revision 3</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>106472351</sdk:size>
+                <sdk:checksum type="sha1">4a50a6679cd95bb68bb5fc032e754cd7c5e2b1bf</sdk:checksum>
+                <sdk:url>android-3.1_r03-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:layoutlib>
+            <sdk:api>4</sdk:api>
+        </sdk:layoutlib>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <!-- Generated on Fri Jul 15 11:50:12 PDT 2011 using honeycomb-mr2-release 140714: Platform. -->
+
+    <sdk:platform>
+        <sdk:version>3.2</sdk:version>
+        <sdk:api-level>13</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>01</sdk:revision>
+        <sdk:min-tools-rev>
+            <sdk:major>12</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:description>Android SDK Platform 3.2, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>108426536</sdk:size>
+                <sdk:checksum type="sha1">6189a500a8c44ae73a439604363de93591163cd9</sdk:checksum>
+                <sdk:url>android-3.2_r01-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:layoutlib>
+            <sdk:api>4</sdk:api>
+        </sdk:layoutlib>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <sdk:platform>
+        <!-- Generated at Thu Dec 15 16:53:11 2011 from git_ics-mr0 @ 238991 -->
+        <sdk:revision>3</sdk:revision>
+        <sdk:description>Android SDK Platform 4.0</sdk:description>
+        <sdk:version>4.0</sdk:version>
+        <sdk:api-level>14</sdk:api-level>
+        <sdk:layoutlib>
+            <sdk:api>7</sdk:api>
+            <sdk:revision>1</sdk:revision>
+        </sdk:layoutlib>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>45919570</sdk:size>
+                <sdk:checksum type="sha1">41ba83b51e886461628c41b1b4d47762e0688ed5</sdk:checksum>
+                <sdk:url>android-14_r03.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <sdk:platform>
+        <!-- Generated at Fri Mar 16 11:22:43 2012 from ics-mr1 @ 291902 -->
+        <sdk:revision>3</sdk:revision>
+        <sdk:description>Android SDK Platform 4.0.3</sdk:description>
+        <sdk:version>4.0.3</sdk:version>
+        <sdk:api-level>15</sdk:api-level>
+        <sdk:min-tools-rev>
+            <sdk:major>15</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:layoutlib>
+            <sdk:api>7</sdk:api>
+            <sdk:revision>1</sdk:revision>
+        </sdk:layoutlib>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>44414679</sdk:size>
+                <sdk:checksum type="sha1">23da24610a8da51054c5391001c51ce43a778b97</sdk:checksum>
+                <sdk:url>android-15_r03.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <sdk:platform>
+        <!-- Generated at Tue Oct  9 13:42:01 2012 from git_jb-dev @ 495790 -->
+        <sdk:revision>3</sdk:revision>
+        <sdk:description>Android SDK Platform 4.1</sdk:description>
+        <sdk:version>4.1.2</sdk:version>
+        <sdk:api-level>16</sdk:api-level>
+        <sdk:min-tools-rev>
+            <sdk:major>20</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:layoutlib>
+            <sdk:api>8</sdk:api>
+            <sdk:revision>1</sdk:revision>
+        </sdk:layoutlib>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>47995505</sdk:size>
+                <sdk:checksum type="sha1">80d9ffef58168f9bccd862830e2ee51f686b167e</sdk:checksum>
+                <sdk:url>android-16_r03.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <sdk:platform>
+        <!-- Generated at Mon Nov 12 17:12:35 2012 from git_jb-mr1-dev @ 526865 -->
+        <sdk:revision>1</sdk:revision>
+        <sdk:description>Android SDK Platform 4.2</sdk:description>
+        <sdk:version>4.2</sdk:version>
+        <sdk:api-level>17</sdk:api-level>
+        <sdk:min-tools-rev>
+            <sdk:major>21</sdk:major>
+        </sdk:min-tools-rev>
+        <sdk:layoutlib>
+            <sdk:api>9</sdk:api>
+            <sdk:revision>1</sdk:revision>
+        </sdk:layoutlib>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>47886130</sdk:size>
+                <sdk:checksum type="sha1">c2e7c8c8db40e06b804ddb1725ac2c3555b55025</sdk:checksum>
+                <sdk:url>android-17_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform>
+
+    <!-- SYSTEM IMAGES ........................ -->
+
+    <sdk:system-image>
+        <!-- Generated at Wed Dec  7 13:47:01 2011 from git_ics-mr0 @ 229537 -->
+        <sdk:revision>2</sdk:revision>
+        <sdk:description>Android SDK Platform 4.0</sdk:description>
+        <sdk:api-level>14</sdk:api-level>
+        <sdk:abi>armeabi-v7a</sdk:abi>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>99621822</sdk:size>
+                <sdk:checksum type="sha1">d8991b0c06b18d7d6ed4169d67460ee1add6661b</sdk:checksum>
+                <sdk:url>sysimg_armv7a-14_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:system-image>
+
+    <sdk:system-image>
+        <!-- Generated at Fri Mar 30 10:43:23 2012 from ics-mr1 @ 302030 -->
+        <sdk:revision>2</sdk:revision>
+        <sdk:description>Android SDK Platform 4.0.3</sdk:description>
+        <sdk:api-level>15</sdk:api-level>
+        <sdk:abi>armeabi-v7a</sdk:abi>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>96227377</sdk:size>
+                <sdk:checksum type="sha1">1bf977d6cb4e0ad38dceac0c4863d1caa21f326e</sdk:checksum>
+                <sdk:url>sysimg_armv7a-15_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:system-image>
+
+    <sdk:system-image>
+        <!-- Generated at Tue Oct  9 13:43:08 2012 from git_jb-dev @ 495790 -->
+        <sdk:revision>3</sdk:revision>
+        <sdk:description>Android SDK Platform 4.1</sdk:description>
+        <sdk:api-level>16</sdk:api-level>
+        <sdk:abi>armeabi-v7a</sdk:abi>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>112528368</sdk:size>
+                <sdk:checksum type="sha1">d1cddb23f17aad5821a089c403d4cddad2cf9ef7</sdk:checksum>
+                <sdk:url>sysimg_armv7a-16_r03.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:system-image>
+
+    <sdk:system-image>
+        <!-- Generated at Mon Nov 12 17:14:39 2012 from git_jb-mr1-dev @ 526865 -->
+        <sdk:revision>1</sdk:revision>
+        <sdk:description>Android SDK Platform 4.2</sdk:description>
+        <sdk:api-level>17</sdk:api-level>
+        <sdk:abi>armeabi-v7a</sdk:abi>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>116831648</sdk:size>
+                <sdk:checksum type="sha1">45b9344473e0a6d063c2b1fe58d8cd47d307905e</sdk:checksum>
+                <sdk:url>sysimg_armv7a-17_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:system-image>
+
+    <!-- SAMPLES ........................ -->
+
+    <!-- Generated on Mon Feb 22 13:39:38 PST 2010 using eclair 25887: Samples. -->
+
+    <sdk:sample>
+        <sdk:api-level>7</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>01</sdk:revision>
+        <sdk:description>Android SDK Samples for Android API 7, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>7677831</sdk:size>
+                <sdk:checksum type="sha1">51e4907f60f248ede5c58b54ce7b6ae0b473e0ca</sdk:checksum>
+                <sdk:url>samples-2.1_r01-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:sample>
+
+    <!-- Generated on Tue May 11 19:15:20 PDT 2010 using froyo 36658: Samples. -->
+
+    <sdk:sample>
+        <sdk:api-level>8</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>01</sdk:revision>
+        <sdk:description>Android SDK Samples for Android API 8, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>7969716</sdk:size>
+                <sdk:checksum type="sha1">d16d8bf2dd84cedf73b98b948d66461c8f19d6fb</sdk:checksum>
+                <sdk:url>samples-2.2_r01-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:sample>
+
+    <!-- Generated on Tue Nov 30 19:39:34 PST 2010 using gingerbread 79962: Samples. -->
+
+    <sdk:sample>
+        <sdk:api-level>9</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>01</sdk:revision>
+        <sdk:description>Android SDK Samples for Android API 9, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:obsolete/>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>8516326</sdk:size>
+                <sdk:checksum type="sha1">36f7dd6c8b5dbb50b3cf3e3ac5209f3fe55db2aa</sdk:checksum>
+                <sdk:url>samples-2.3_r01-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:sample>
+
+    <!-- Generated on Tue Feb  8 17:37:15 PST 2011 using gingerbread 102121: Samples. -->
+
+    <sdk:sample>
+        <sdk:api-level>10</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>01</sdk:revision>
+        <sdk:description>Android SDK Samples for Android API 10, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>8539583</sdk:size>
+                <sdk:checksum type="sha1">93b0c3f3bdf5b07f1f115100b4954f0665297a0d</sdk:checksum>
+                <sdk:url>samples-2.3.3_r01-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:sample>
+
+    <!-- Generated on Thu Feb 17 08:45:49 PST 2011 using honeycomb 104254: Samples. -->
+
+    <sdk:sample>
+        <sdk:api-level>11</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>01</sdk:revision>
+        <sdk:description>Android SDK Samples for Android API 11, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>11976920</sdk:size>
+                <sdk:checksum type="sha1">3749ace584631270268d65bb1d0ad61b0d691682</sdk:checksum>
+                <sdk:url>samples-3.0_r01-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:sample>
+
+    <!-- Generated on Wed May  4 19:49:56 PDT 2011 using honeycomb-mr1 123685: Samples. -->
+
+    <sdk:sample>
+        <sdk:api-level>12</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>01</sdk:revision>
+        <sdk:description>Android SDK Samples for Android API 12, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>12150514</sdk:size>
+                <sdk:checksum type="sha1">df0ace37cbca73373fe94080f94c71557cac73a7</sdk:checksum>
+                <sdk:url>samples-3.1_r01-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:sample>
+
+    <!-- Generated on Fri Jul 15 11:52:24 PDT 2011 using honeycomb-mr2 142871: Samples. -->
+
+    <sdk:sample>
+        <sdk:api-level>13</sdk:api-level>
+        <sdk:codename/>
+        <sdk:revision>01</sdk:revision>
+        <sdk:description>Android SDK Samples for Android API 13, revision 1</sdk:description>
+        <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>12193502</sdk:size>
+                <sdk:checksum type="sha1">078bcf1abc1cb8921f3fa482c252963a782bed60</sdk:checksum>
+                <sdk:url>samples-3.2_r01-linux.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:sample>
+
+    <sdk:sample>
+        <!-- Generated at Wed Dec  7 13:48:27 2011 from git_ics-mr0 @ 234950 -->
+        <sdk:revision>2</sdk:revision>
+        <sdk:api-level>14</sdk:api-level>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>16253619</sdk:size>
+                <sdk:checksum type="sha1">1312c22ab0b650e26835cc3945d4ff8cea183416</sdk:checksum>
+                <sdk:url>samples-14_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:sample>
+
+    <sdk:sample>
+        <!-- Generated at Fri Mar 16 11:27:52 2012 from ics-mr1 @ 291902 -->
+        <sdk:revision>2</sdk:revision>
+        <sdk:api-level>15</sdk:api-level>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>16366656</sdk:size>
+                <sdk:checksum type="sha1">042f368c5b09eca4d278264e6dbf9c12c5f73d1f</sdk:checksum>
+                <sdk:url>samples-15_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:sample>
+
+    <sdk:sample>
+        <!-- Generated at Sun Jun 24 14:02:06 2012 from git_jb-release @ 391408 -->
+        <sdk:revision>1</sdk:revision>
+        <sdk:api-level>16</sdk:api-level>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>14729945</sdk:size>
+                <sdk:checksum type="sha1">dce3a2d41db50a381ef47ee8bddbe928520e685e</sdk:checksum>
+                <sdk:url>samples-16_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:sample>
+
+    <sdk:sample>
+        <!-- Generated at Mon Nov 12 17:18:09 2012 from git_jb-mr1-dev @ 526865 -->
+        <sdk:revision>1</sdk:revision>
+        <sdk:api-level>17</sdk:api-level>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>14840030</sdk:size>
+                <sdk:checksum type="sha1">12d58cb26503610fc05bd7618c434cc6f983bc41</sdk:checksum>
+                <sdk:url>samples-17_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:sample>
+
+    <!-- PLATFORM-TOOLS ........................ -->
+
+    <sdk:platform-tool>
+        <!-- Generated at Mon Nov 12 17:13:48 2012 from git_jb-mr1-dev @ 527242 -->
+        <sdk:revision>
+            <sdk:major>16</sdk:major>
+        </sdk:revision>
+        <sdk:archives>
+            <sdk:archive arch="any" os="windows">
+                <sdk:size>11938435</sdk:size>
+                <sdk:checksum type="sha1">0d6245b685c7d303cf4a054a3d373c4427b7ad01</sdk:checksum>
+                <sdk:url>platform-tools_r16-windows.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="linux">
+                <sdk:size>12676089</sdk:size>
+                <sdk:checksum type="sha1">84d563ae5e324f223f335f11bf511bf6207c05fb</sdk:checksum>
+                <sdk:url>platform-tools_r16-linux.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="macosx">
+                <sdk:size>13147351</sdk:size>
+                <sdk:checksum type="sha1">fbb0f8d2786a83b8c3eb6df402e706e136db8fed</sdk:checksum>
+                <sdk:url>platform-tools_r16-macosx.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:platform-tool>
+
+    <!-- TOOLS ........................ -->
+
+    <sdk:tool>
+        <!-- Generated at Mon Nov 12 17:07:47 2012 from git_tools_r21 @ 519525 -->
+        <sdk:revision>
+            <sdk:major>21</sdk:major>
+        </sdk:revision>
+        <sdk:min-platform-tools-rev>
+            <sdk:major>16</sdk:major>
+        </sdk:min-platform-tools-rev>
+        <sdk:archives>
+            <sdk:archive arch="any" os="windows">
+                <sdk:size>98982670</sdk:size>
+                <sdk:checksum type="sha1">57bbfadcedbef44fc322e5e037666393668cf3fe</sdk:checksum>
+                <sdk:url>tools_r21-windows.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="linux">
+                <sdk:size>91495104</sdk:size>
+                <sdk:checksum type="sha1">013b9c04407a9d73b8bf3c574327fbe870acd264</sdk:checksum>
+                <sdk:url>tools_r21-linux.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="macosx">
+                <sdk:size>65767130</sdk:size>
+                <sdk:checksum type="sha1">fcfa3a6932f2ed0d970a0ca959bb2b4972f7d46d</sdk:checksum>
+                <sdk:url>tools_r21-macosx.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:tool>
+
+    <sdk:tool>
+        <!-- Generated at Fri Nov 30 13:45:55 2012 from git_tools_r21 @ 539280 -->
+        <sdk:revision>
+            <sdk:major>21</sdk:major>
+            <sdk:minor>0</sdk:minor>
+            <sdk:micro>1</sdk:micro>
+            <sdk:preview>1</sdk:preview>
+        </sdk:revision>
+        <sdk:min-platform-tools-rev>
+            <sdk:major>16</sdk:major>
+        </sdk:min-platform-tools-rev>
+        <sdk:archives>
+            <sdk:archive arch="any" os="windows">
+                <sdk:size>98998088</sdk:size>
+                <sdk:checksum type="sha1">1503aaf2c91cb07c0240a2db3af0de027941a4f6</sdk:checksum>
+                <sdk:url>tools_r21.0.1_rc1-windows.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="linux">
+                <sdk:size>91510079</sdk:size>
+                <sdk:checksum type="sha1">183670a7f9878d8d3693d5fcf32e1357b69f0fed</sdk:checksum>
+                <sdk:url>tools_r21.0.1_rc1-linux.zip</sdk:url>
+            </sdk:archive>
+            <sdk:archive arch="any" os="macosx">
+                <sdk:size>65777178</sdk:size>
+                <sdk:checksum type="sha1">109d4f287904875f067e021be3fd1f549e6afb67</sdk:checksum>
+                <sdk:url>tools_r21.0.1_rc1-macosx.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:tool>
+
+    <!-- DOCS ........................ -->
+
+    <sdk:doc>
+        <!-- Generated at Mon Nov 12 17:17:53 2012 from git_jb-mr1-dev @ 528390 -->
+        <sdk:revision>1</sdk:revision>
+        <sdk:api-level>17</sdk:api-level>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>171564393</sdk:size>
+                <sdk:checksum type="sha1">fb988cdd2beaac0dd47dc630821ccc30557c67e5</sdk:checksum>
+                <sdk:url>docs-17_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:doc>
+
+    <!-- SOURCES ........................ -->
+
+    <sdk:source>
+        <!-- Generated at Wed Dec  7 13:48:11 2011 from git_ics-mr0 @ 234950 -->
+        <sdk:revision>1</sdk:revision>
+        <sdk:api-level>14</sdk:api-level>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>16152383</sdk:size>
+                <sdk:checksum type="sha1">eaf4ed7dcac46e68516a1b4aa5b0d9e5a39a7555</sdk:checksum>
+                <sdk:url>sources-14_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:source>
+
+    <sdk:source>
+        <!-- Generated at Fri Mar 30 10:43:44 2012 from ics-mr1 @ 302030 -->
+        <sdk:revision>2</sdk:revision>
+        <sdk:api-level>15</sdk:api-level>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>16468746</sdk:size>
+                <sdk:checksum type="sha1">e5992a5747c9590783fbbdd700337bf0c9f6b1fa</sdk:checksum>
+                <sdk:url>sources-15_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:source>
+
+    <sdk:source>
+        <!-- Generated at Thu Jul 19 18:39:42 2012 from git_jb-release @ 403059 -->
+        <sdk:revision>2</sdk:revision>
+        <sdk:api-level>16</sdk:api-level>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>17876720</sdk:size>
+                <sdk:checksum type="sha1">0f83c14ed333c45d962279ab5d6bc98a0269ef84</sdk:checksum>
+                <sdk:url>sources-16_r02.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:source>
+
+    <sdk:source>
+        <!-- Generated at Mon Nov 12 17:16:08 2012 from git_jb-mr1-dev @ 526865 -->
+        <sdk:revision>1</sdk:revision>
+        <sdk:api-level>17</sdk:api-level>
+        <sdk:archives>
+            <sdk:archive arch="any" os="any">
+                <sdk:size>18976816</sdk:size>
+                <sdk:checksum type="sha1">6f1f18cd2d2b1852d7f6892df9cee3823349d43a</sdk:checksum>
+                <sdk:url>sources-17_r01.zip</sdk:url>
+            </sdk:archive>
+        </sdk:archives>
+        <sdk:uses-license ref="android-sdk-license"/>
+    </sdk:source>
+</sdk:sdk-repository>
diff --git a/pkgs/development/mobile/androidenv/support.nix b/pkgs/development/mobile/androidenv/support.nix
new file mode 100644
index 00000000000..2e9690de7a2
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/support.nix
@@ -0,0 +1,17 @@
+{stdenv, fetchurl, unzip}:
+
+stdenv.mkDerivation {
+  name = "android-support-r11";
+  src = fetchurl {
+    url = https://dl-ssl.google.com/android/repository/support_r11.zip;
+    sha1 = "d30d182d8e4c86bb4464c03a83ccffce7bc84ecd";
+  };
+  
+  buildCommand = ''
+    mkdir -p $out
+    cd $out
+    unzip $src
+  '';
+  
+  buildInputs = [ unzip ];
+}
\ No newline at end of file
diff --git a/pkgs/development/mobile/androidenv/sysimages.nix b/pkgs/development/mobile/androidenv/sysimages.nix
new file mode 100644
index 00000000000..b35b4298983
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/sysimages.nix
@@ -0,0 +1,50 @@
+
+{stdenv, fetchurl, unzip}:
+
+let
+  buildSystemImage = args:
+    stdenv.mkDerivation (args // {   
+      buildInputs = [ unzip ];
+      buildCommand = ''
+        mkdir -p $out
+        cd $out
+        unzip $src
+    '';
+  });
+in
+{
+    
+  sysimg_14 = buildSystemImage {
+    name = "armeabi-v7a-14";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/sysimg_armv7a-14_r02.zip;
+      sha1 = "d8991b0c06b18d7d6ed4169d67460ee1add6661b";
+    };
+  };
+    
+  sysimg_15 = buildSystemImage {
+    name = "armeabi-v7a-15";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/sysimg_armv7a-15_r02.zip;
+      sha1 = "1bf977d6cb4e0ad38dceac0c4863d1caa21f326e";
+    };
+  };
+    
+  sysimg_16 = buildSystemImage {
+    name = "armeabi-v7a-16";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/sysimg_armv7a-16_r03.zip;
+      sha1 = "d1cddb23f17aad5821a089c403d4cddad2cf9ef7";
+    };
+  };
+    
+  sysimg_17 = buildSystemImage {
+    name = "armeabi-v7a-17";
+    src = fetchurl {
+      url = https://dl-ssl.google.com/android/repository/sysimg_armv7a-17_r01.zip;
+      sha1 = "45b9344473e0a6d063c2b1fe58d8cd47d307905e";
+    };
+  };
+    
+}
+  
\ No newline at end of file
diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix
new file mode 100644
index 00000000000..3ac9e4bb958
--- /dev/null
+++ b/pkgs/development/mobile/xcodeenv/build-app.nix
@@ -0,0 +1,92 @@
+{stdenv, xcodewrapper}:
+{ name
+, src
+, target ? null
+, configuration ? null
+, scheme ? null
+, sdk ? null
+, arch ? null
+, xcodeFlags ? ""
+, release ? false
+, codeSignIdentity ? null
+, certificateFile ? null
+, certificatePassword ? null
+, provisioningProfile ? null
+, generateIPA ? false
+, generateXCArchive ? false
+}:
+
+assert release -> codeSignIdentity != null && certificateFile != null && certificatePassword != null && provisioningProfile != null;
+
+let
+  # Set some default values here
+  
+  _target = if target == null then name else target;
+  _scheme = if scheme == null then name else scheme;
+
+  _configuration = if configuration == null
+    then
+      if release then "Release" else "Debug"
+    else configuration;
+    
+  _arch = if arch == null
+    then
+      if release then "armv7" else "i386"
+    else arch;
+
+  _sdk = if sdk == null
+    then
+      if release then "iphoneos6.0" else "iphonesimulator6.0"
+    else sdk;
+
+  # The following is to prevent repetition
+  deleteKeychain = "security delete-keychain $keychainName";
+in
+stdenv.mkDerivation {
+  inherit name src;
+  buildInputs = [ xcodewrapper ];
+  buildPhase = ''
+    ${stdenv.lib.optionalString release ''
+        export HOME=/Users/$(whoami)
+        keychainName="$(basename $out)"
+        
+        # Create a keychain
+        security create-keychain -p "" $keychainName
+        security default-keychain -s $keychainName
+        security unlock-keychain -p "" $keychainName
+        
+        # Import the certificate into the keychain
+        security import ${certificateFile} -k $keychainName -P "${certificatePassword}" -A 
+
+        # Determine provisioning ID
+        PROVISIONING_PROFILE=$(grep UUID -A1 -a ${provisioningProfile} | grep -o "[-A-Z0-9]\{36\}")
+
+        if [ ! -f "$HOME/Library/MobileDevice/Provisioning Profiles/$PROVISIONING_PROFILE.mobileprovision" ]
+        then
+            # Copy provisioning profile into the home directory
+            mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
+            cp ${provisioningProfile} "$HOME/Library/MobileDevice/Provisioning Profiles/$PROVISIONING_PROFILE.mobileprovision"
+        fi
+        
+        # Check whether the identity can be found
+        security find-identity -p codesigning $keychainName
+      ''}
+
+    # Do the building
+    xcodebuild -target ${_target} -configuration ${_configuration} -scheme ${_scheme} -sdk ${_sdk} -arch ${_arch} ONLY_ACTIVE_ARCH=NO CONFIGURATION_TEMP_DIR=$TMPDIR CONFIGURATION_BUILD_DIR=$out ${if generateXCArchive then "archive" else ""} ${xcodeFlags} ${if release then ''"CODE_SIGN_IDENTITY=${codeSignIdentity}" PROVISIONING_PROFILE=$PROVISIONING_PROFILE OTHER_CODE_SIGN_FLAGS="--keychain $HOME/Library/Keychains/$keychainName"'' else ""}
+    
+    ${stdenv.lib.optionalString release ''
+      ${stdenv.lib.optionalString generateIPA ''
+        # Produce an IPA file
+        xcrun -sdk iphoneos PackageApplication -v $out/*.app -o $out/${name}.ipa
+      ''}
+      
+      # Delete our temp keychain
+      ${deleteKeychain}
+    ''}
+  '';
+  
+  failureHook = stdenv.lib.optionalString release deleteKeychain;
+  
+  installPhase = "true";
+}
diff --git a/pkgs/development/mobile/xcodeenv/default.nix b/pkgs/development/mobile/xcodeenv/default.nix
new file mode 100644
index 00000000000..7f834688e63
--- /dev/null
+++ b/pkgs/development/mobile/xcodeenv/default.nix
@@ -0,0 +1,15 @@
+{stdenv}:
+
+rec {
+  xcodewrapper = import ./xcodewrapper.nix {
+    inherit stdenv;
+  };
+
+  buildApp = import ./build-app.nix {
+    inherit stdenv xcodewrapper;
+  };
+
+  simulateApp = import ./simulate-app.nix {
+    inherit stdenv xcodewrapper;
+  };
+}
diff --git a/pkgs/development/mobile/xcodeenv/simulate-app.nix b/pkgs/development/mobile/xcodeenv/simulate-app.nix
new file mode 100644
index 00000000000..456732abe1f
--- /dev/null
+++ b/pkgs/development/mobile/xcodeenv/simulate-app.nix
@@ -0,0 +1,17 @@
+{stdenv, xcodewrapper}:
+{name, app, device ? "iPhone", baseDir ? ""}:
+
+stdenv.mkDerivation {
+  inherit name;
+  buildCommand = ''
+    ensureDir $out/bin
+    cat > $out/bin/run-test-simulator << "EOF"
+    #! ${stdenv.shell} -e
+
+    cd ${app}/${baseDir}/${name}.app
+    "$(readlink "${xcodewrapper}/bin/iPhone Simulator")" -SimulateApplication ./${name} -SimulateDevice '${device}'
+    EOF
+    chmod +x $out/bin/run-test-simulator
+  '';
+}
+
diff --git a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
new file mode 100644
index 00000000000..39804b1a248
--- /dev/null
+++ b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
@@ -0,0 +1,24 @@
+{stdenv}:
+
+let
+  version = "4.5.2";
+in
+stdenv.mkDerivation {
+  name = "xcode-wrapper-"+version;
+  buildCommand = ''
+    ensureDir $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 "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator"
+
+    # Check if we have the xcodebuild version that we want
+    if [ -z "$($out/bin/xcodebuild -version | grep ${version})" ]
+    then
+        echo "We require xcodebuild version: ${version}"
+        exit 1
+    fi
+  '';
+}