titaniumsdk: Add 3.2 SDK option

This commit is contained in:
Sander van der Burg
2014-02-18 16:34:34 +01:00
parent e2bc091213
commit 70798243a2
8 changed files with 954 additions and 529 deletions
@@ -1,4 +1,4 @@
{stdenv, androidsdk, titaniumsdk, titanium, xcodewrapper, jdk, python}:
{stdenv, androidsdk, titaniumsdk, titanium, xcodewrapper, jdk, python, which}:
{ name, src, target, androidPlatformVersions ? [ "8" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null
, release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null
, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
name = stdenv.lib.replaceChars [" "] [""] name;
inherit src;
buildInputs = [ titanium jdk python ] ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") xcodewrapper;
buildInputs = [ titanium jdk python which ] ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") xcodewrapper;
buildPhase = ''
export HOME=$TMPDIR
@@ -38,16 +38,21 @@ stdenv.mkDerivation {
echo "{}" > $TMPDIR/config.json
titanium --config-file $TMPDIR/config.json --no-colors config sdk.defaultInstallLocation ${titaniumsdk}
titanium --config-file $TMPDIR/config.json --no-colors config paths.modules ${titaniumsdk}
mkdir -p $out
${if target == "android" then
''
cat $TMPDIR/config.json
titanium config --config-file $TMPDIR/config.json --no-colors android.sdkPath ${androidsdkComposition}/libexec/android-sdk-*
${if release then
''titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target dist-playstore --keystore ${androidKeyStore} --alias ${androidKeyAlias} --password ${androidKeyStorePassword} --output-dir $out''
else
# /run/current-system/sw/bin/strace -f -y
''titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target emulator --build-only --output $out''}
''
else if target == "iphone" then