titaniumsdk: add SDK version 5.1 and remove older versions

This commit is contained in:
Sander van der Burg
2016-01-07 13:47:26 +00:00
parent d3de3db077
commit d268fa7676
18 changed files with 2814 additions and 462 deletions
@@ -1,25 +1,5 @@
{pkgs, pkgs_i686, xcodeVersion ? "6.1.1", xcodeBaseDir ? "/Applications/Xcode.app", tiVersion ? "3.5.1.GA"}:
{pkgs, pkgs_i686, xcodeVersion ? "7.2", xcodeBaseDir ? "/Applications/Xcode.app", tiVersion ? "5.1.1.GA"}:
let
# We have to use Oracle's JDK. On Darwin, just simply expose the host system's
# JDK. According to their docs, OpenJDK is not supported.
jdkWrapper = pkgs.stdenv.mkDerivation {
name = "jdk-wrapper";
buildCommand = ''
mkdir -p $out/bin
cd $out/bin
ln -s /usr/bin/javac
ln -s /usr/bin/java
ln -s /usr/bin/jarsigner
ln -s /usr/bin/jar
ln -s /usr/bin/keytool
'';
setupHook = ''
export JAVA_HOME=/usr
'';
};
in
rec {
androidenv = pkgs.androidenv;
@@ -29,11 +9,7 @@ rec {
} else null;
titaniumsdk = let
titaniumSdkFile = if tiVersion == "3.1.4.GA" then ./titaniumsdk-3.1.nix
else if tiVersion == "3.2.3.GA" then ./titaniumsdk-3.2.nix
else if tiVersion == "3.3.0.GA" then ./titaniumsdk-3.3.nix
else if tiVersion == "3.4.0.GA" then ./titaniumsdk-3.4.nix
else if tiVersion == "3.5.1.GA" then ./titaniumsdk-3.5.nix
titaniumSdkFile = if tiVersion == "5.1.1.GA" then ./titaniumsdk-5.1.nix
else throw "Titanium version not supported: "+tiVersion;
in
import titaniumSdkFile {
@@ -41,11 +17,8 @@ rec {
};
buildApp = import ./build-app.nix {
inherit (pkgs) stdenv python which;
jdk = if pkgs.stdenv.isLinux then pkgs.oraclejdk7
else if pkgs.stdenv.isDarwin then jdkWrapper
else throw "Platform not supported: ${pkgs.stdenv.system}";
inherit (pkgs.nodePackages) titanium;
inherit (pkgs) stdenv python which jdk;
titanium = (import ./cli { inherit (pkgs.stdenv) system; }).titanium {};
inherit (androidenv) androidsdk;
inherit (xcodeenv) xcodewrapper;
inherit titaniumsdk xcodeBaseDir;