Skip to content

Commit

Permalink
titaniumenv: upgrade to 6.3 and remove deprecated old versions
Browse files Browse the repository at this point in the history
  • Loading branch information
svanderburg committed Jan 5, 2018
1 parent bb06428 commit fb346c3
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 112 deletions.
16 changes: 9 additions & 7 deletions pkgs/development/mobile/titaniumenv/build-app.nix
@@ -1,7 +1,7 @@
{stdenv, androidsdk, titaniumsdk, titanium, alloy, xcodewrapper, jdk, python, nodejs, which, xcodeBaseDir}:
{ name, src, target, androidPlatformVersions ? [ "23" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null
{stdenv, androidsdk, titaniumsdk, titanium, alloy, xcodewrapper, jdk, python, nodejs, which, file, xcodeBaseDir}:
{ name, src, preBuild ? "", target, androidPlatformVersions ? [ "25" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null
, release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null
, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "10.2"
, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "11.2"
, enableWirelessDistribution ? false, installURL ? null
}:

Expand Down Expand Up @@ -47,9 +47,11 @@ stdenv.mkDerivation {
name = stdenv.lib.replaceChars [" "] [""] name;
inherit src;

buildInputs = [ nodejs titanium alloy jdk python which ] ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") xcodewrapper;
buildInputs = [ nodejs titanium alloy jdk python which file ] ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") xcodewrapper;

buildPhase = ''
${preBuild}
export HOME=$TMPDIR
${stdenv.lib.optionalString (tiVersion != null) ''
Expand Down Expand Up @@ -77,9 +79,9 @@ stdenv.mkDerivation {
export JAVA_HOME=${javaVersionFixWrapper}
javac -version
''}
titanium config --config-file $TMPDIR/config.json --no-colors android.sdk ${androidsdkComposition}/libexec
titanium config --config-file $TMPDIR/config.json --no-colors android.sdkPath ${androidsdkComposition}/libexec
export PATH=$(echo ${androidsdkComposition}/libexec/tools):$(echo ${androidsdkComposition}/libexec/build-tools/android-*):$PATH
${if release then
Expand Down
8 changes: 3 additions & 5 deletions pkgs/development/mobile/titaniumenv/default.nix
Expand Up @@ -9,18 +9,16 @@ rec {
} else null;

titaniumsdk = let
titaniumSdkFile = if tiVersion == "5.1.2.GA" then ./titaniumsdk-5.1.nix
else if tiVersion == "5.2.3.GA" then ./titaniumsdk-5.2.nix
else if tiVersion == "6.0.2.GA" then ./titaniumsdk-6.0.nix
titaniumSdkFile = if tiVersion == "6.3.1.GA" then ./titaniumsdk-6.3.nix
else throw "Titanium version not supported: "+tiVersion;
in
import titaniumSdkFile {
inherit (pkgs) stdenv fetchurl unzip makeWrapper python jdk;
};

buildApp = import ./build-app.nix {
inherit (pkgs) stdenv python which jdk nodejs;
inherit (pkgs.nodePackages_4_x) titanium alloy;
inherit (pkgs) stdenv python which file jdk nodejs;
inherit (pkgs.nodePackages_6_x) alloy titanium;
inherit (androidenv) androidsdk;
inherit (xcodeenv) xcodewrapper;
inherit titaniumsdk xcodeBaseDir;
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/mobile/titaniumenv/examples/default.nix
@@ -1,10 +1,10 @@
{ nixpkgs ? <nixpkgs>
, systems ? [ "x86_64-linux" "x86_64-darwin" ]
, xcodeVersion ? "8.2.1"
, xcodeVersion ? "9.2"
, xcodeBaseDir ? "/Applications/Xcode.app"
, tiVersion ? "6.0.2.GA"
, tiVersion ? "6.3.1.GA"
, rename ? false
, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "10.2"
, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "11.2"
, enableWirelessDistribution ? false, installURL ? null
}:

Expand Down
@@ -1,5 +1,5 @@
{ titaniumenv, fetchgit, target, androidPlatformVersions ? [ "23" ], tiVersion ? "5.1.2.GA", release ? false
, rename ? false, stdenv ? null, newBundleId ? null, iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? null, iosCertificatePassword ? null, iosVersion ? "8.1"
{ titaniumenv, fetchgit, target, androidPlatformVersions ? [ "25" "26" ], tiVersion ? "6.3.1.GA", release ? false
, rename ? false, stdenv ? null, newBundleId ? null, iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? null, iosCertificatePassword ? null, iosVersion ? "11.2"
, enableWirelessDistribution ? false, installURL ? null
}:

Expand All @@ -9,9 +9,9 @@ let
src = fetchgit {
url = https://github.com/appcelerator/KitchenSink.git;
rev = "ec9edebf35030f61368000a8a9071dd7a0773884";
sha256 = "1j41w4nhcbl40x550pjgabqrach80f9dybv7ya32771wnw2000iy";
sha256 = "3e020004b73c9c2386f2672fdf9203083295f1524f5e504a07842e062de181c8";
};

# Rename the bundle id to something else
renamedSrc = stdenv.mkDerivation {
name = "KitchenSink-renamedsrc";
Expand All @@ -29,14 +29,17 @@ in
titaniumenv.buildApp {
name = "KitchenSink-${target}-${if release then "release" else "debug"}";
src = if rename then renamedSrc else src;
preBuild = ''
sed -i -e "s|23|25|" tiapp.xml
''; # Raise minimum android SDK from 23 to 25
inherit tiVersion;

inherit target androidPlatformVersions release;

androidKeyStore = ./keystore;
androidKeyAlias = "myfirstapp";
androidKeyStorePassword = "mykeystore";

inherit iosMobileProvisioningProfile iosCertificate iosCertificateName iosCertificatePassword iosVersion;
inherit enableWirelessDistribution installURL;
}
42 changes: 0 additions & 42 deletions pkgs/development/mobile/titaniumenv/titaniumsdk-5.1.nix

This file was deleted.

42 changes: 0 additions & 42 deletions pkgs/development/mobile/titaniumenv/titaniumsdk-5.2.nix

This file was deleted.

@@ -1,14 +1,14 @@
{stdenv, fetchurl, unzip, makeWrapper, python, jdk}:

stdenv.mkDerivation {
name = "mobilesdk-6.0.2.GA";
name = "mobilesdk-6.3.1.GA";
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl {
url = http://builds.appcelerator.com/mobile/6_0_X/mobilesdk-6.0.2.v20170123140026-linux.zip;
sha256 = "1yjhr4fgjnxfxzwmgw71yynrfzhsjqj2cirjr5rd14zlp4q9751q";
url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-linux.zip;
sha256 = "0g8dqqf5ffa7ll3rqm5naywipnv2vvfxcj9fmqg1wnvvxf0rflqj";
}
else if stdenv.system == "x86_64-darwin" then fetchurl {
url = http://builds.appcelerator.com/mobile/6_0_X/mobilesdk-6.0.2.v20170123140026-osx.zip;
sha256 = "1ijd1wp56ygy238xpcffy112akim208wbv5zm901dvych83ibw1c";
url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-osx.zip;
sha256 = "00bm8vv70mg4kd7jvmxd1bfqafv6zdpdx816i0hvf801zwnak4nj";
}
else throw "Platform: ${stdenv.system} not supported!";

Expand All @@ -21,7 +21,7 @@ stdenv.mkDerivation {
# Rename ugly version number
cd mobilesdk/*
mv * 6.0.2.GA
mv * 6.3.1.GA
cd *
# Patch some executables
Expand Down

0 comments on commit fb346c3

Please sign in to comment.