40 lines
1.5 KiB
Nix
40 lines
1.5 KiB
Nix
{ titaniumenv, fetchgit, target, androidPlatformVersions ? [ "11" ], tiVersion ? "3.2.1.GA", release ? false
|
|
, rename ? false, stdenv ? null, newBundleId ? null, iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? null, iosCertificatePassword ? null
|
|
}:
|
|
|
|
assert rename -> (stdenv != null && newBundleId != null && iosMobileProvisioningProfile != null && iosCertificate != null && iosCertificateName != null && iosCertificatePassword != null);
|
|
|
|
let
|
|
src = fetchgit {
|
|
url = https://github.com/appcelerator/KitchenSink.git;
|
|
rev = "0b8175f20f0aa71f93921025dec5d0f3299960ae";
|
|
sha256 = "0b2p4wbnlp46wpanqj5h3yfb2hdbh20nxbis8zscj4qlgrnyjdjz";
|
|
};
|
|
|
|
# Rename the bundle id to something else
|
|
renamedSrc = stdenv.mkDerivation {
|
|
name = "KitchenSink-renamedsrc";
|
|
inherit src;
|
|
buildPhase = ''
|
|
sed -i -e "s|com.appcelerator.kitchensink|${newBundleId}|" tiapp.xml
|
|
sed -i -e "s|com.appcelerator.kitchensink|${newBundleId}|" manifest
|
|
'';
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
mv * $out
|
|
'';
|
|
};
|
|
in
|
|
titaniumenv.buildApp {
|
|
name = "KitchenSink-${target}-${if release then "release" else "debug"}";
|
|
src = if rename then renamedSrc else src;
|
|
inherit tiVersion;
|
|
|
|
inherit target androidPlatformVersions release;
|
|
|
|
androidKeyStore = ./keystore;
|
|
androidKeyAlias = "myfirstapp";
|
|
androidKeyStorePassword = "mykeystore";
|
|
|
|
inherit iosMobileProvisioningProfile iosCertificate iosCertificateName iosCertificatePassword;
|
|
}
|