@@ -15,34 +15,12 @@ let
1515 abiVersions = androidAbiVersions;
1616 useGoogleAPIs = true;
1717 };
18−
18+
1919 deleteKeychain = ''
2020 security default-keychain -s login.keychain
2121 security delete-keychain $keychainName
2222 rm -f $HOME/lock-keychain
2323 '';
24−
25− # On macOS, the java executable shows an -unoffical postfix in the version
26− # number. This confuses the build script's version detector.
27− # We fix this by creating a wrapper that strips it out of the output.
28−
29− javaVersionFixWrapper = stdenv.mkDerivation {
30− name = "javaVersionFixWrapper";
31− buildCommand = ''
32− mkdir -p $out/bin
33− cat > $out/bin/javac <<EOF
34− #! ${stdenv.shell} -e
35−
36− if [ "\$1" = "-version" ]
37− then
38− ${jdk}/bin/javac "\$@" 2>&1 | sed "s|-unofficial||" | sed "s|-u60|_60|" >&2
39− else
40− exec ${jdk}/bin/javac "\$@"
41− fi
42− EOF
43− chmod +x $out/bin/javac
44− '';
45− };
4624in
4725stdenv.mkDerivation {
4826 name = stdenv.lib.replaceChars [" "] [""] name;
@@ -74,13 +52,6 @@ stdenv.mkDerivation {
7452
7553 ${if target == "android" then
7654 ''
77− ${stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") ''
78− # Hack to make version detection work with OpenJDK on macOS
79− export PATH=${javaVersionFixWrapper}/bin:$PATH
80− export JAVA_HOME=${javaVersionFixWrapper}
81− javac -version
82− ''}
83−
8455 titanium config --config-file $TMPDIR/config.json --no-colors android.sdkPath ${androidsdkComposition}/libexec
8556
8657 export PATH=$(echo ${androidsdkComposition}/libexec/tools):$(echo ${androidsdkComposition}/libexec/build-tools/android-*):$PATH