From 4beb695eceea1aa00201e7f0ee5165fc948e9eb3 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Wed, 21 Mar 2018 14:57:57 +0100 Subject: [PATCH] titaniumenv: fix Android signing on darwin --- pkgs/development/mobile/titaniumenv/build-app.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix index a6bf05c2465..83bd941e5ff 100644 --- a/pkgs/development/mobile/titaniumenv/build-app.nix +++ b/pkgs/development/mobile/titaniumenv/build-app.nix @@ -58,7 +58,13 @@ stdenv.mkDerivation { export GRADLE_USER_HOME=$TMPDIR/gradle ${if release then - ''titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target dist-playstore --keystore ${androidKeyStore} --alias ${androidKeyAlias} --store-password ${androidKeyStorePassword} --output-dir $out'' + '' + ${stdenv.lib.optionalString stdenv.isDarwin '' + # Signing the app does not work with OpenJDK on macOS, use host SDK instead + export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)" + ''} + titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target dist-playstore --keystore ${androidKeyStore} --alias ${androidKeyAlias} --store-password ${androidKeyStorePassword} --output-dir $out + '' else ''titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target emulator --build-only -B foo --output $out''} ''