Merge pull request #144748 from status-im/gomobile-aarch64-darwin-fix

This commit is contained in:
Sandro 2021-11-09 22:45:19 +01:00 committed by GitHub
commit 3e09ae93b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
{ stdenv, lib, fetchgit, buildGoModule, zlib, makeWrapper, xcodeenv, androidenv
, xcodeWrapperArgs ? { }
, xcodeWrapper ? xcodeenv.composeXcodeWrapper xcodeWrapperArgs
, withAndroidPkgs ? true
, androidPkgs ? androidenv.composeAndroidPackages {
includeNDK = true;
ndkVersion = "22.1.7171670";
@ -43,10 +44,12 @@ buildGoModule {
mkdir -p $out/src/golang.org/x
ln -s $src $out/src/golang.org/x/mobile
wrapProgram $out/bin/gomobile \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ zlib ]}" \
'' + lib.optionalString withAndroidPkgs ''
--prefix PATH : "${androidPkgs.androidsdk}/bin" \
--set ANDROID_NDK_HOME "${androidPkgs.androidsdk}/libexec/android-sdk/ndk-bundle" \
--set ANDROID_HOME "${androidPkgs.androidsdk}/libexec/android-sdk"
--set ANDROID_HOME "${androidPkgs.androidsdk}/libexec/android-sdk" \
'' + ''
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ zlib ]}"
'';
meta = with lib; {