titaniumenv: upgrade to 6.3 and remove deprecated old versions

+31 -112
+9 -7
pkgs/development/mobile/titaniumenv/build-app.nix
··· 1 - {stdenv, androidsdk, titaniumsdk, titanium, alloy, xcodewrapper, jdk, python, nodejs, which, xcodeBaseDir}: 2 - { name, src, target, androidPlatformVersions ? [ "23" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null 3 , release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null 4 - , iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "10.2" 5 , enableWirelessDistribution ? false, installURL ? null 6 }: 7 ··· 47 name = stdenv.lib.replaceChars [" "] [""] name; 48 inherit src; 49 50 - buildInputs = [ nodejs titanium alloy jdk python which ] ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") xcodewrapper; 51 52 buildPhase = '' 53 export HOME=$TMPDIR 54 55 ${stdenv.lib.optionalString (tiVersion != null) '' ··· 77 export JAVA_HOME=${javaVersionFixWrapper} 78 javac -version 79 ''} 80 - 81 - titanium config --config-file $TMPDIR/config.json --no-colors android.sdk ${androidsdkComposition}/libexec 82 - 83 export PATH=$(echo ${androidsdkComposition}/libexec/tools):$(echo ${androidsdkComposition}/libexec/build-tools/android-*):$PATH 84 85 ${if release then
··· 1 + {stdenv, androidsdk, titaniumsdk, titanium, alloy, xcodewrapper, jdk, python, nodejs, which, file, xcodeBaseDir}: 2 + { name, src, preBuild ? "", target, androidPlatformVersions ? [ "25" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null 3 , release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null 4 + , iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "11.2" 5 , enableWirelessDistribution ? false, installURL ? null 6 }: 7 ··· 47 name = stdenv.lib.replaceChars [" "] [""] name; 48 inherit src; 49 50 + buildInputs = [ nodejs titanium alloy jdk python which file ] ++ stdenv.lib.optional (stdenv.system == "x86_64-darwin") xcodewrapper; 51 52 buildPhase = '' 53 + ${preBuild} 54 + 55 export HOME=$TMPDIR 56 57 ${stdenv.lib.optionalString (tiVersion != null) '' ··· 79 export JAVA_HOME=${javaVersionFixWrapper} 80 javac -version 81 ''} 82 + 83 + titanium config --config-file $TMPDIR/config.json --no-colors android.sdkPath ${androidsdkComposition}/libexec 84 + 85 export PATH=$(echo ${androidsdkComposition}/libexec/tools):$(echo ${androidsdkComposition}/libexec/build-tools/android-*):$PATH 86 87 ${if release then
+3 -5
pkgs/development/mobile/titaniumenv/default.nix
··· 9 } else null; 10 11 titaniumsdk = let 12 - titaniumSdkFile = if tiVersion == "5.1.2.GA" then ./titaniumsdk-5.1.nix 13 - else if tiVersion == "5.2.3.GA" then ./titaniumsdk-5.2.nix 14 - else if tiVersion == "6.0.2.GA" then ./titaniumsdk-6.0.nix 15 else throw "Titanium version not supported: "+tiVersion; 16 in 17 import titaniumSdkFile { ··· 19 }; 20 21 buildApp = import ./build-app.nix { 22 - inherit (pkgs) stdenv python which jdk nodejs; 23 - inherit (pkgs.nodePackages_4_x) titanium alloy; 24 inherit (androidenv) androidsdk; 25 inherit (xcodeenv) xcodewrapper; 26 inherit titaniumsdk xcodeBaseDir;
··· 9 } else null; 10 11 titaniumsdk = let 12 + titaniumSdkFile = if tiVersion == "6.3.1.GA" then ./titaniumsdk-6.3.nix 13 else throw "Titanium version not supported: "+tiVersion; 14 in 15 import titaniumSdkFile { ··· 17 }; 18 19 buildApp = import ./build-app.nix { 20 + inherit (pkgs) stdenv python which file jdk nodejs; 21 + inherit (pkgs.nodePackages_6_x) alloy titanium; 22 inherit (androidenv) androidsdk; 23 inherit (xcodeenv) xcodewrapper; 24 inherit titaniumsdk xcodeBaseDir;
+3 -3
pkgs/development/mobile/titaniumenv/examples/default.nix
··· 1 { nixpkgs ? <nixpkgs> 2 , systems ? [ "x86_64-linux" "x86_64-darwin" ] 3 - , xcodeVersion ? "8.2.1" 4 , xcodeBaseDir ? "/Applications/Xcode.app" 5 - , tiVersion ? "6.0.2.GA" 6 , rename ? false 7 - , newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "10.2" 8 , enableWirelessDistribution ? false, installURL ? null 9 }: 10
··· 1 { nixpkgs ? <nixpkgs> 2 , systems ? [ "x86_64-linux" "x86_64-darwin" ] 3 + , xcodeVersion ? "9.2" 4 , xcodeBaseDir ? "/Applications/Xcode.app" 5 + , tiVersion ? "6.3.1.GA" 6 , rename ? false 7 + , newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "11.2" 8 , enableWirelessDistribution ? false, installURL ? null 9 }: 10
+10 -7
pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix
··· 1 - { titaniumenv, fetchgit, target, androidPlatformVersions ? [ "23" ], tiVersion ? "5.1.2.GA", release ? false 2 - , rename ? false, stdenv ? null, newBundleId ? null, iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? null, iosCertificatePassword ? null, iosVersion ? "8.1" 3 , enableWirelessDistribution ? false, installURL ? null 4 }: 5 ··· 9 src = fetchgit { 10 url = https://github.com/appcelerator/KitchenSink.git; 11 rev = "ec9edebf35030f61368000a8a9071dd7a0773884"; 12 - sha256 = "1j41w4nhcbl40x550pjgabqrach80f9dybv7ya32771wnw2000iy"; 13 }; 14 - 15 # Rename the bundle id to something else 16 renamedSrc = stdenv.mkDerivation { 17 name = "KitchenSink-renamedsrc"; ··· 29 titaniumenv.buildApp { 30 name = "KitchenSink-${target}-${if release then "release" else "debug"}"; 31 src = if rename then renamedSrc else src; 32 inherit tiVersion; 33 - 34 inherit target androidPlatformVersions release; 35 - 36 androidKeyStore = ./keystore; 37 androidKeyAlias = "myfirstapp"; 38 androidKeyStorePassword = "mykeystore"; 39 - 40 inherit iosMobileProvisioningProfile iosCertificate iosCertificateName iosCertificatePassword iosVersion; 41 inherit enableWirelessDistribution installURL; 42 }
··· 1 + { titaniumenv, fetchgit, target, androidPlatformVersions ? [ "25" "26" ], tiVersion ? "6.3.1.GA", release ? false 2 + , rename ? false, stdenv ? null, newBundleId ? null, iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? null, iosCertificatePassword ? null, iosVersion ? "11.2" 3 , enableWirelessDistribution ? false, installURL ? null 4 }: 5 ··· 9 src = fetchgit { 10 url = https://github.com/appcelerator/KitchenSink.git; 11 rev = "ec9edebf35030f61368000a8a9071dd7a0773884"; 12 + sha256 = "3e020004b73c9c2386f2672fdf9203083295f1524f5e504a07842e062de181c8"; 13 }; 14 + 15 # Rename the bundle id to something else 16 renamedSrc = stdenv.mkDerivation { 17 name = "KitchenSink-renamedsrc"; ··· 29 titaniumenv.buildApp { 30 name = "KitchenSink-${target}-${if release then "release" else "debug"}"; 31 src = if rename then renamedSrc else src; 32 + preBuild = '' 33 + sed -i -e "s|23|25|" tiapp.xml 34 + ''; # Raise minimum android SDK from 23 to 25 35 inherit tiVersion; 36 + 37 inherit target androidPlatformVersions release; 38 + 39 androidKeyStore = ./keystore; 40 androidKeyAlias = "myfirstapp"; 41 androidKeyStorePassword = "mykeystore"; 42 + 43 inherit iosMobileProvisioningProfile iosCertificate iosCertificateName iosCertificatePassword iosVersion; 44 inherit enableWirelessDistribution installURL; 45 }
-42
pkgs/development/mobile/titaniumenv/titaniumsdk-5.1.nix
··· 1 - {stdenv, fetchurl, unzip, makeWrapper, python, jdk}: 2 - 3 - stdenv.mkDerivation { 4 - name = "mobilesdk-5.1.2.GA"; 5 - src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl { 6 - url = http://builds.appcelerator.com/mobile/5_1_X/mobilesdk-5.1.2.v20151216190036-linux.zip; 7 - sha256 = "013ipqwkfqj60mn09jbbf6a9mc4pjrn0kr0ix906whzb888zz6bv"; 8 - } 9 - else if stdenv.system == "x86_64-darwin" then fetchurl { 10 - url = http://builds.appcelerator.com/mobile/5_1_X/mobilesdk-5.1.2.v20151216190036-osx.zip; 11 - sha256 = "1ylwh7zxa5yfyckzn3a9zc4cmh8gdndgb3jyr61s3j7zb1whn9ww"; 12 - } 13 - else throw "Platform: ${stdenv.system} not supported!"; 14 - 15 - buildInputs = [ unzip makeWrapper ]; 16 - 17 - buildCommand = '' 18 - mkdir -p $out 19 - cd $out 20 - (yes y | unzip $src) || true 21 - 22 - # Rename ugly version number 23 - cd mobilesdk/* 24 - mv * 5.1.2.GA 25 - cd * 26 - 27 - # Hack to make dx.jar work with new build-tools 28 - sed -i -e "s|path.join(dir, 'platform-tools', 'lib', 'dx.jar')|path.join(dir, 'build-tools', 'android-6.0', 'lib', 'dx.jar')|" $out/mobilesdk/*/*/node_modules/titanium-sdk/lib/android.js 29 - 30 - # Patch some executables 31 - 32 - ${if stdenv.system == "i686-linux" then 33 - '' 34 - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32 35 - '' 36 - else if stdenv.system == "x86_64-linux" then 37 - '' 38 - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64 39 - '' 40 - else ""} 41 - ''; 42 - }
···
-42
pkgs/development/mobile/titaniumenv/titaniumsdk-5.2.nix
··· 1 - {stdenv, fetchurl, unzip, makeWrapper, python, jdk}: 2 - 3 - stdenv.mkDerivation { 4 - name = "mobilesdk-5.2.3.GA"; 5 - src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl { 6 - url = http://builds.appcelerator.com/mobile/5_2_X/mobilesdk-5.2.3.v20160404160237-linux.zip; 7 - sha256 = "1acvkj3nrkgf9ch4js0pnjnwq5x6ddc15pkcanshp1zlc41z16gj"; 8 - } 9 - else if stdenv.system == "x86_64-darwin" then fetchurl { 10 - url = http://builds.appcelerator.com/mobile/5_2_X/mobilesdk-5.2.3.v20160404160237-osx.zip; 11 - sha256 = "04l7mrwiy3il2kzxz6sbfmczkqlkcrnwwndfzi8h5dzgh1672b7d"; 12 - } 13 - else throw "Platform: ${stdenv.system} not supported!"; 14 - 15 - buildInputs = [ unzip makeWrapper ]; 16 - 17 - buildCommand = '' 18 - mkdir -p $out 19 - cd $out 20 - (yes y | unzip $src) || true 21 - 22 - # Rename ugly version number 23 - cd mobilesdk/* 24 - mv * 5.2.3.GA 25 - cd * 26 - 27 - # Hack to make dx.jar work with new build-tools 28 - #sed -i -e "s|path.join(dir, 'platform-tools', 'lib', 'dx.jar')|path.join(dir, 'build-tools', 'android-6.0', 'lib', 'dx.jar')|" $out/mobilesdk/*/*/node_modules/titanium-sdk/lib/android.js 29 - 30 - # Patch some executables 31 - 32 - ${if stdenv.system == "i686-linux" then 33 - '' 34 - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32 35 - '' 36 - else if stdenv.system == "x86_64-linux" then 37 - '' 38 - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64 39 - '' 40 - else ""} 41 - ''; 42 - }
···
+6 -6
pkgs/development/mobile/titaniumenv/titaniumsdk-6.0.nix pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix
··· 1 {stdenv, fetchurl, unzip, makeWrapper, python, jdk}: 2 3 stdenv.mkDerivation { 4 - name = "mobilesdk-6.0.2.GA"; 5 src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl { 6 - url = http://builds.appcelerator.com/mobile/6_0_X/mobilesdk-6.0.2.v20170123140026-linux.zip; 7 - sha256 = "1yjhr4fgjnxfxzwmgw71yynrfzhsjqj2cirjr5rd14zlp4q9751q"; 8 } 9 else if stdenv.system == "x86_64-darwin" then fetchurl { 10 - url = http://builds.appcelerator.com/mobile/6_0_X/mobilesdk-6.0.2.v20170123140026-osx.zip; 11 - sha256 = "1ijd1wp56ygy238xpcffy112akim208wbv5zm901dvych83ibw1c"; 12 } 13 else throw "Platform: ${stdenv.system} not supported!"; 14 ··· 21 22 # Rename ugly version number 23 cd mobilesdk/* 24 - mv * 6.0.2.GA 25 cd * 26 27 # Patch some executables
··· 1 {stdenv, fetchurl, unzip, makeWrapper, python, jdk}: 2 3 stdenv.mkDerivation { 4 + name = "mobilesdk-6.3.1.GA"; 5 src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl { 6 + url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-linux.zip; 7 + sha256 = "0g8dqqf5ffa7ll3rqm5naywipnv2vvfxcj9fmqg1wnvvxf0rflqj"; 8 } 9 else if stdenv.system == "x86_64-darwin" then fetchurl { 10 + url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-osx.zip; 11 + sha256 = "00bm8vv70mg4kd7jvmxd1bfqafv6zdpdx816i0hvf801zwnak4nj"; 12 } 13 else throw "Platform: ${stdenv.system} not supported!"; 14 ··· 21 22 # Rename ugly version number 23 cd mobilesdk/* 24 + mv * 6.3.1.GA 25 cd * 26 27 # Patch some executables