titaniumenv: fix android builds on darwin and get rid of allowUnfree since the OpenJDK just works fine
This commit is contained in:
parent
0c5ad78c18
commit
4d0e732168
@ -20,6 +20,28 @@ let
|
|||||||
security default-keychain -s login.keychain
|
security default-keychain -s login.keychain
|
||||||
security delete-keychain $keychainName
|
security delete-keychain $keychainName
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# On Mac OS X, the java executable shows an -unoffical postfix in the version
|
||||||
|
# number. This confuses the build script's version detector.
|
||||||
|
# We fix this by creating a wrapper that strips it out of the output.
|
||||||
|
|
||||||
|
javaVersionFixWrapper = stdenv.mkDerivation {
|
||||||
|
name = "javaVersionFixWrapper";
|
||||||
|
buildCommand = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cat > $out/bin/javac <<EOF
|
||||||
|
#! ${stdenv.shell} -e
|
||||||
|
|
||||||
|
if [ "\$1" = "-version" ]
|
||||||
|
then
|
||||||
|
${jdk}/bin/javac "\$@" 2>&1 | sed "s|-unofficial||" | sed "s|-u60|_60|" >&2
|
||||||
|
else
|
||||||
|
exec ${jdk}/bin/javac "\$@"
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
chmod +x $out/bin/javac
|
||||||
|
'';
|
||||||
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = stdenv.lib.replaceChars [" "] [""] name;
|
name = stdenv.lib.replaceChars [" "] [""] name;
|
||||||
@ -49,6 +71,13 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
${if target == "android" then
|
${if target == "android" then
|
||||||
''
|
''
|
||||||
|
${stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") ''
|
||||||
|
# Hack to make version detection work with OpenJDK on Mac OS X
|
||||||
|
export PATH=${javaVersionFixWrapper}/bin:$PATH
|
||||||
|
export JAVA_HOME=${javaVersionFixWrapper}
|
||||||
|
javac -version
|
||||||
|
''}
|
||||||
|
|
||||||
titanium config --config-file $TMPDIR/config.json --no-colors android.sdk ${androidsdkComposition}/libexec/android-sdk-*
|
titanium config --config-file $TMPDIR/config.json --no-colors android.sdk ${androidsdkComposition}/libexec/android-sdk-*
|
||||||
titanium config --config-file $TMPDIR/config.json --no-colors android.buildTools.selectedVersion 23.0.1
|
titanium config --config-file $TMPDIR/config.json --no-colors android.buildTools.selectedVersion 23.0.1
|
||||||
|
|
||||||
|
@ -5,17 +5,16 @@
|
|||||||
, tiVersion ? "5.1.2.GA"
|
, tiVersion ? "5.1.2.GA"
|
||||||
, rename ? false
|
, rename ? false
|
||||||
, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "9.2"
|
, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "9.2"
|
||||||
, allowUnfree ? false
|
|
||||||
, enableWirelessDistribution ? false, installURL ? null
|
, enableWirelessDistribution ? false, installURL ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { config.allowUnfree = allowUnfree; };
|
pkgs = import nixpkgs {};
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
kitchensink_android_debug = pkgs.lib.genAttrs systems (system:
|
kitchensink_android_debug = pkgs.lib.genAttrs systems (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; config.allowUnfree = allowUnfree; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
in
|
in
|
||||||
import ./kitchensink {
|
import ./kitchensink {
|
||||||
inherit (pkgs) fetchgit;
|
inherit (pkgs) fetchgit;
|
||||||
@ -26,7 +25,7 @@ rec {
|
|||||||
|
|
||||||
kitchensink_android_release = pkgs.lib.genAttrs systems (system:
|
kitchensink_android_release = pkgs.lib.genAttrs systems (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; config.allowUnfree = allowUnfree; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
in
|
in
|
||||||
import ./kitchensink {
|
import ./kitchensink {
|
||||||
inherit (pkgs) fetchgit;
|
inherit (pkgs) fetchgit;
|
||||||
@ -38,7 +37,7 @@ rec {
|
|||||||
|
|
||||||
emulate_kitchensink_debug = pkgs.lib.genAttrs systems (system:
|
emulate_kitchensink_debug = pkgs.lib.genAttrs systems (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; config.allowUnfree = allowUnfree; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
in
|
in
|
||||||
import ./emulate-kitchensink {
|
import ./emulate-kitchensink {
|
||||||
inherit (pkgs) androidenv;
|
inherit (pkgs) androidenv;
|
||||||
@ -47,7 +46,7 @@ rec {
|
|||||||
|
|
||||||
emulate_kitchensink_release = pkgs.lib.genAttrs systems (system:
|
emulate_kitchensink_release = pkgs.lib.genAttrs systems (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; config.allowUnfree = allowUnfree; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
in
|
in
|
||||||
import ./emulate-kitchensink {
|
import ./emulate-kitchensink {
|
||||||
inherit (pkgs) androidenv;
|
inherit (pkgs) androidenv;
|
||||||
@ -74,7 +73,7 @@ rec {
|
|||||||
};
|
};
|
||||||
} else {}) // (if rename then
|
} else {}) // (if rename then
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { system = "x86_64-darwin"; config.allowUnfree = allowUnfree; };
|
pkgs = import nixpkgs { system = "x86_64-darwin"; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
kitchensink_ipa = import ./kitchensink {
|
kitchensink_ipa = import ./kitchensink {
|
||||||
|
Loading…
Reference in New Issue
Block a user