titaniumenv: upgrade to 6.3 and remove deprecated old versions
This commit is contained in:
parent
bb06428818
commit
fb346c3402
@ -1,7 +1,7 @@
|
|||||||
{stdenv, androidsdk, titaniumsdk, titanium, alloy, xcodewrapper, jdk, python, nodejs, which, xcodeBaseDir}:
|
{stdenv, androidsdk, titaniumsdk, titanium, alloy, xcodewrapper, jdk, python, nodejs, which, file, xcodeBaseDir}:
|
||||||
{ name, src, target, androidPlatformVersions ? [ "23" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null
|
{ name, src, preBuild ? "", target, androidPlatformVersions ? [ "25" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null
|
||||||
, release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? 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
|
, enableWirelessDistribution ? false, installURL ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -47,9 +47,11 @@ stdenv.mkDerivation {
|
|||||||
name = stdenv.lib.replaceChars [" "] [""] name;
|
name = stdenv.lib.replaceChars [" "] [""] name;
|
||||||
inherit src;
|
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 = ''
|
buildPhase = ''
|
||||||
|
${preBuild}
|
||||||
|
|
||||||
export HOME=$TMPDIR
|
export HOME=$TMPDIR
|
||||||
|
|
||||||
${stdenv.lib.optionalString (tiVersion != null) ''
|
${stdenv.lib.optionalString (tiVersion != null) ''
|
||||||
@ -77,9 +79,9 @@ stdenv.mkDerivation {
|
|||||||
export JAVA_HOME=${javaVersionFixWrapper}
|
export JAVA_HOME=${javaVersionFixWrapper}
|
||||||
javac -version
|
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
|
export PATH=$(echo ${androidsdkComposition}/libexec/tools):$(echo ${androidsdkComposition}/libexec/build-tools/android-*):$PATH
|
||||||
|
|
||||||
${if release then
|
${if release then
|
||||||
|
@ -9,9 +9,7 @@ rec {
|
|||||||
} else null;
|
} else null;
|
||||||
|
|
||||||
titaniumsdk = let
|
titaniumsdk = let
|
||||||
titaniumSdkFile = if tiVersion == "5.1.2.GA" then ./titaniumsdk-5.1.nix
|
titaniumSdkFile = if tiVersion == "6.3.1.GA" then ./titaniumsdk-6.3.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
|
|
||||||
else throw "Titanium version not supported: "+tiVersion;
|
else throw "Titanium version not supported: "+tiVersion;
|
||||||
in
|
in
|
||||||
import titaniumSdkFile {
|
import titaniumSdkFile {
|
||||||
@ -19,8 +17,8 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildApp = import ./build-app.nix {
|
buildApp = import ./build-app.nix {
|
||||||
inherit (pkgs) stdenv python which jdk nodejs;
|
inherit (pkgs) stdenv python which file jdk nodejs;
|
||||||
inherit (pkgs.nodePackages_4_x) titanium alloy;
|
inherit (pkgs.nodePackages_6_x) alloy titanium;
|
||||||
inherit (androidenv) androidsdk;
|
inherit (androidenv) androidsdk;
|
||||||
inherit (xcodeenv) xcodewrapper;
|
inherit (xcodeenv) xcodewrapper;
|
||||||
inherit titaniumsdk xcodeBaseDir;
|
inherit titaniumsdk xcodeBaseDir;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{ nixpkgs ? <nixpkgs>
|
{ nixpkgs ? <nixpkgs>
|
||||||
, systems ? [ "x86_64-linux" "x86_64-darwin" ]
|
, systems ? [ "x86_64-linux" "x86_64-darwin" ]
|
||||||
, xcodeVersion ? "8.2.1"
|
, xcodeVersion ? "9.2"
|
||||||
, xcodeBaseDir ? "/Applications/Xcode.app"
|
, xcodeBaseDir ? "/Applications/Xcode.app"
|
||||||
, tiVersion ? "6.0.2.GA"
|
, tiVersion ? "6.3.1.GA"
|
||||||
, rename ? false
|
, 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
|
, enableWirelessDistribution ? false, installURL ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ titaniumenv, fetchgit, target, androidPlatformVersions ? [ "23" ], tiVersion ? "5.1.2.GA", release ? false
|
{ 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 ? "8.1"
|
, rename ? false, stdenv ? null, newBundleId ? null, iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? null, iosCertificatePassword ? null, iosVersion ? "11.2"
|
||||||
, enableWirelessDistribution ? false, installURL ? null
|
, enableWirelessDistribution ? false, installURL ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -9,9 +9,9 @@ let
|
|||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = https://github.com/appcelerator/KitchenSink.git;
|
url = https://github.com/appcelerator/KitchenSink.git;
|
||||||
rev = "ec9edebf35030f61368000a8a9071dd7a0773884";
|
rev = "ec9edebf35030f61368000a8a9071dd7a0773884";
|
||||||
sha256 = "1j41w4nhcbl40x550pjgabqrach80f9dybv7ya32771wnw2000iy";
|
sha256 = "3e020004b73c9c2386f2672fdf9203083295f1524f5e504a07842e062de181c8";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Rename the bundle id to something else
|
# Rename the bundle id to something else
|
||||||
renamedSrc = stdenv.mkDerivation {
|
renamedSrc = stdenv.mkDerivation {
|
||||||
name = "KitchenSink-renamedsrc";
|
name = "KitchenSink-renamedsrc";
|
||||||
@ -29,14 +29,17 @@ in
|
|||||||
titaniumenv.buildApp {
|
titaniumenv.buildApp {
|
||||||
name = "KitchenSink-${target}-${if release then "release" else "debug"}";
|
name = "KitchenSink-${target}-${if release then "release" else "debug"}";
|
||||||
src = if rename then renamedSrc else src;
|
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 tiVersion;
|
||||||
|
|
||||||
inherit target androidPlatformVersions release;
|
inherit target androidPlatformVersions release;
|
||||||
|
|
||||||
androidKeyStore = ./keystore;
|
androidKeyStore = ./keystore;
|
||||||
androidKeyAlias = "myfirstapp";
|
androidKeyAlias = "myfirstapp";
|
||||||
androidKeyStorePassword = "mykeystore";
|
androidKeyStorePassword = "mykeystore";
|
||||||
|
|
||||||
inherit iosMobileProvisioningProfile iosCertificate iosCertificateName iosCertificatePassword iosVersion;
|
inherit iosMobileProvisioningProfile iosCertificate iosCertificateName iosCertificatePassword iosVersion;
|
||||||
inherit enableWirelessDistribution installURL;
|
inherit enableWirelessDistribution installURL;
|
||||||
}
|
}
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
{stdenv, fetchurl, unzip, makeWrapper, python, jdk}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "mobilesdk-5.1.2.GA";
|
|
||||||
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl {
|
|
||||||
url = http://builds.appcelerator.com/mobile/5_1_X/mobilesdk-5.1.2.v20151216190036-linux.zip;
|
|
||||||
sha256 = "013ipqwkfqj60mn09jbbf6a9mc4pjrn0kr0ix906whzb888zz6bv";
|
|
||||||
}
|
|
||||||
else if stdenv.system == "x86_64-darwin" then fetchurl {
|
|
||||||
url = http://builds.appcelerator.com/mobile/5_1_X/mobilesdk-5.1.2.v20151216190036-osx.zip;
|
|
||||||
sha256 = "1ylwh7zxa5yfyckzn3a9zc4cmh8gdndgb3jyr61s3j7zb1whn9ww";
|
|
||||||
}
|
|
||||||
else throw "Platform: ${stdenv.system} not supported!";
|
|
||||||
|
|
||||||
buildInputs = [ unzip makeWrapper ];
|
|
||||||
|
|
||||||
buildCommand = ''
|
|
||||||
mkdir -p $out
|
|
||||||
cd $out
|
|
||||||
(yes y | unzip $src) || true
|
|
||||||
|
|
||||||
# Rename ugly version number
|
|
||||||
cd mobilesdk/*
|
|
||||||
mv * 5.1.2.GA
|
|
||||||
cd *
|
|
||||||
|
|
||||||
# Hack to make dx.jar work with new build-tools
|
|
||||||
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
|
|
||||||
|
|
||||||
# Patch some executables
|
|
||||||
|
|
||||||
${if stdenv.system == "i686-linux" then
|
|
||||||
''
|
|
||||||
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32
|
|
||||||
''
|
|
||||||
else if stdenv.system == "x86_64-linux" then
|
|
||||||
''
|
|
||||||
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64
|
|
||||||
''
|
|
||||||
else ""}
|
|
||||||
'';
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
{stdenv, fetchurl, unzip, makeWrapper, python, jdk}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "mobilesdk-5.2.3.GA";
|
|
||||||
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl {
|
|
||||||
url = http://builds.appcelerator.com/mobile/5_2_X/mobilesdk-5.2.3.v20160404160237-linux.zip;
|
|
||||||
sha256 = "1acvkj3nrkgf9ch4js0pnjnwq5x6ddc15pkcanshp1zlc41z16gj";
|
|
||||||
}
|
|
||||||
else if stdenv.system == "x86_64-darwin" then fetchurl {
|
|
||||||
url = http://builds.appcelerator.com/mobile/5_2_X/mobilesdk-5.2.3.v20160404160237-osx.zip;
|
|
||||||
sha256 = "04l7mrwiy3il2kzxz6sbfmczkqlkcrnwwndfzi8h5dzgh1672b7d";
|
|
||||||
}
|
|
||||||
else throw "Platform: ${stdenv.system} not supported!";
|
|
||||||
|
|
||||||
buildInputs = [ unzip makeWrapper ];
|
|
||||||
|
|
||||||
buildCommand = ''
|
|
||||||
mkdir -p $out
|
|
||||||
cd $out
|
|
||||||
(yes y | unzip $src) || true
|
|
||||||
|
|
||||||
# Rename ugly version number
|
|
||||||
cd mobilesdk/*
|
|
||||||
mv * 5.2.3.GA
|
|
||||||
cd *
|
|
||||||
|
|
||||||
# Hack to make dx.jar work with new build-tools
|
|
||||||
#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
|
|
||||||
|
|
||||||
# Patch some executables
|
|
||||||
|
|
||||||
${if stdenv.system == "i686-linux" then
|
|
||||||
''
|
|
||||||
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32
|
|
||||||
''
|
|
||||||
else if stdenv.system == "x86_64-linux" then
|
|
||||||
''
|
|
||||||
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64
|
|
||||||
''
|
|
||||||
else ""}
|
|
||||||
'';
|
|
||||||
}
|
|
@ -1,14 +1,14 @@
|
|||||||
{stdenv, fetchurl, unzip, makeWrapper, python, jdk}:
|
{stdenv, fetchurl, unzip, makeWrapper, python, jdk}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
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 {
|
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;
|
url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-linux.zip;
|
||||||
sha256 = "1yjhr4fgjnxfxzwmgw71yynrfzhsjqj2cirjr5rd14zlp4q9751q";
|
sha256 = "0g8dqqf5ffa7ll3rqm5naywipnv2vvfxcj9fmqg1wnvvxf0rflqj";
|
||||||
}
|
}
|
||||||
else if stdenv.system == "x86_64-darwin" then fetchurl {
|
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;
|
url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-osx.zip;
|
||||||
sha256 = "1ijd1wp56ygy238xpcffy112akim208wbv5zm901dvych83ibw1c";
|
sha256 = "00bm8vv70mg4kd7jvmxd1bfqafv6zdpdx816i0hvf801zwnak4nj";
|
||||||
}
|
}
|
||||||
else throw "Platform: ${stdenv.system} not supported!";
|
else throw "Platform: ${stdenv.system} not supported!";
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
# Rename ugly version number
|
# Rename ugly version number
|
||||||
cd mobilesdk/*
|
cd mobilesdk/*
|
||||||
mv * 6.0.2.GA
|
mv * 6.3.1.GA
|
||||||
cd *
|
cd *
|
||||||
|
|
||||||
# Patch some executables
|
# Patch some executables
|
Loading…
x
Reference in New Issue
Block a user