gomobile: 2022-05-18 -> 0-unstable-2024-12-13

This commit is contained in:
aucub 2024-12-22 01:38:55 +08:00
parent 295409d952
commit f5abef98e8

View file

@ -10,25 +10,25 @@
xcodeWrapperArgs ? { }, xcodeWrapperArgs ? { },
xcodeWrapper ? xcodeenv.composeXcodeWrapper xcodeWrapperArgs, xcodeWrapper ? xcodeenv.composeXcodeWrapper xcodeWrapperArgs,
withAndroidPkgs ? true, withAndroidPkgs ? true,
androidPkgs ? androidenv.composeAndroidPackages { androidPkgs ? (
includeNDK = true; androidenv.composeAndroidPackages {
ndkVersion = "22.1.7171670"; includeNDK = true;
}, }
),
}: }:
buildGoModule { buildGoModule {
pname = "gomobile"; pname = "gomobile";
version = "unstable-2022-05-18"; version = "0-unstable-2024-12-13";
vendorHash = "sha256-AmOy3X+d2OD7ZLbFuy+SptdlgWbZJaXYEgO79M64ufE=";
src = fetchgit { src = fetchgit {
rev = "8578da9835fd365e78a6e63048c103b27a53a82c";
name = "gomobile"; name = "gomobile";
url = "https://go.googlesource.com/mobile"; url = "https://go.googlesource.com/mobile";
sha256 = "sha256-AOR/p+DW83f2+BOxm2rFXBCrotcIyunK3UzQ/dnauWY="; rev = "a87c1cf6cf463f0d4476cfe0fcf67c2953d76e7c";
hash = "sha256-7j4rdmCZMC8tn4vAsC9x/mMNkom/+Tl7uAY+5gkSvfY=";
}; };
vendorHash = "sha256-6ycxEDEE0/i6Lxo0gb8wq3U2U7Q49AJj+PdzSl57wwI=";
subPackages = [ subPackages = [
"bind" "bind"
"cmd/gobind" "cmd/gobind"
@ -56,25 +56,22 @@ buildGoModule {
ln -s $src $out/src/golang.org/x/mobile ln -s $src $out/src/golang.org/x/mobile
''; '';
postFixup = postFixup = ''
'' for prog in gomobile gobind; do
for bin in $(ls $out/bin); do wrapProgram $out/bin/$prog \
wrapProgram $out/bin/$bin \ --suffix GOPATH : $out \
--suffix GOPATH : $out \ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ zlib ]}" \
'' ${lib.optionalString withAndroidPkgs ''
+ lib.optionalString withAndroidPkgs '' --prefix PATH : "${androidPkgs.androidsdk}/bin" \
--prefix PATH : "${androidPkgs.androidsdk}/bin" \ --set-default ANDROID_HOME "${androidPkgs.androidsdk}/libexec/android-sdk"
--set-default ANDROID_HOME "${androidPkgs.androidsdk}/libexec/android-sdk" \ ''}
'' done
+ '' '';
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ zlib ]}"
done
'';
meta = with lib; { meta = {
description = "Tool for building and running mobile apps written in Go"; description = "Tool for building and running mobile apps written in Go";
homepage = "https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile"; homepage = "https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile";
license = licenses.bsd3; license = with lib.licenses; [ bsd3 ];
maintainers = with maintainers; [ jakubgs ]; maintainers = with lib.maintainers; [ jakubgs ];
}; };
} }