From 6dff469edca42f70d1c8c2f1fb5614a5ae4c7001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 9 Jun 2022 18:19:23 +0200 Subject: [PATCH] tmp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- nix/mobile.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/nix/mobile.nix b/nix/mobile.nix index 76fc0865..518d5cb8 100644 --- a/nix/mobile.nix +++ b/nix/mobile.nix @@ -23,18 +23,21 @@ in buildGoModule { proxyVendor = true; ANDROID_HOME = "${androidSdk}/libexec/android-sdk"; - ANDROID_NDK_ROOT = "${androidSdk}/libexec/android-sdk/ndk-bundle"; - ANDROID_NDK_HOME = "${androidSdk}/libexec/android-sdk/ndk-bundle"; - #GOMOBILE = pkgs.gomobile; - #GOHOSTARCH = "amd64"; - #GO111MODULE = "off"; + GO111MODULE = "off"; + GOMOBILE = gomobile; + + shellHook = '' + env | grep -E '^(ANDROID|GO)' + ''; buildPhase = '' + runHook shellHook + unset GOARCH gomobile bind -x \ -target=android/arm64 \ -androidapi=23 \ -ldflags="-s -w" \ - -o ./build/lib/Gowaku.xcframework \ + -o ./build/lib/gowaku.aar \ ./mobile '';