Removed titanium SDK 2.1, since it's deprecated long ago and no longer works with the new Android SDK

This commit is contained in:
Sander van der Burg 2014-01-13 13:52:43 +01:00
parent db3220a59a
commit 10a6618d60
4 changed files with 3 additions and 80 deletions

View file

@ -1,19 +1,11 @@
{pkgs, pkgs_i686, version ? "3.1"}:
{pkgs, pkgs_i686}:
let
titaniumexpr = if version == "2.1" then
./titaniumsdk-2.1.nix
else if version == "3.1" then
./titaniumsdk.nix
else
throw "Unknown Titanium SDK version: ${version}";
in
rec {
androidenv = pkgs.androidenv;
xcodeenv = if pkgs.stdenv.system == "x86_64-darwin" then pkgs.xcodeenv else null;
titaniumsdk = import titaniumexpr {
titaniumsdk = import ./titaniumsdk.nix {
inherit (pkgs) stdenv fetchurl unzip makeWrapper python jdk;
};

View file

@ -1 +0,0 @@
s|apk_zip.write(os.path.join(lib_source_dir, fname), lib_dest_dir + fname)|info = zipfile.ZipInfo(lib_dest_dir + fname)\n\t\t\t\t\tinfo.compress_type = zipfile.ZIP_DEFLATED\n\t\t\t\t\tinfo.create_system = 3\n\t\t\t\t\tf = open(os.path.join(lib_source_dir, fname))\n\t\t\t\t\tapk_zip.writestr(info, f.read())\n\t\t\t\t\tf.close()|

View file

@ -1,60 +0,0 @@
{stdenv, fetchurl, unzip, makeWrapper, python, jdk}:
stdenv.mkDerivation {
name = "titanium-mobilesdk-2.1.4.v20121109124659";
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl {
url = http://builds.appcelerator.com.s3.amazonaws.com/mobile/2_1_X/mobilesdk-2.1.4.v20121109124659-linux.zip;
sha1 = "381eb4b06b5a261ddf336c52d4714e5626142697";
}
else if stdenv.system == "x86_64-darwin" then fetchurl {
url = http://builds.appcelerator.com.s3.amazonaws.com/mobile/2_1_X/mobilesdk-2.1.4.v20121109124659-osx.zip;
sha1 = "1cef5803f0c7b7bb35feb88d3f91bbb191e3953e";
}
else throw "Platform: ${stdenv.system} not supported!";
buildInputs = [ unzip makeWrapper ];
buildCommand = ''
mkdir -p $out
cd $out
yes y | unzip $src
# Fix shebang header for python scripts
find . -name \*.py | while read i
do
sed -i -e "s|#!/usr/bin/env python|#!${python}/bin/python|" $i
done
# Zip files do not support timestamps lower than 1980. We have to apply a few work-arounds to cope with that
# Yes, I know it's nasty :-)
cd mobilesdk/*/*/android
sed -i -f ${./fixtiverify.sed} builder.py
sed -i -f ${./fixselfruntimev8.sed} builder.py
sed -i -f ${./fixnativelibs.sed} builder.py
# Patch some executables
${if stdenv.system == "i686-linux" then
''
patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux.so.2 titanium_prep.linux32
''
else if stdenv.system == "x86_64-linux" then
''
patchelf --set-interpreter ${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2 titanium_prep.linux64
''
else ""}
# Wrap builder script
wrapProgram `pwd`/builder.py \
--prefix PYTHONPATH : ${python.modules.sqlite3}/lib/python*/site-packages \
--prefix PATH : ${jdk}/bin \
--prefix JAVA_HOME : ${jdk}
'' + stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") ''
# 'ditto' utility is needed to copy stuff to the Xcode organizer. Dirty, but this allows it to work.
sed -i -e "s|ditto|/usr/bin/ditto|g" $out/mobilesdk/osx/*/iphone/builder.py
'';
}

View file

@ -483,19 +483,11 @@ let
xcodeenv = callPackage ../development/mobile/xcodeenv { };
titaniumenv_2_1 = import ../development/mobile/titaniumenv {
inherit pkgs;
pkgs_i686 = pkgsi686Linux;
version = "2.1";
};
titaniumenv_3_1 = import ../development/mobile/titaniumenv {
titaniumenv = import ../development/mobile/titaniumenv {
inherit pkgs;
pkgs_i686 = pkgsi686Linux;
};
titaniumenv = titaniumenv_3_1;
inherit (androidenv) androidsdk_4_1;
aria = builderDefsPackage (import ../tools/networking/aria) { };