Skip to content

Commit

Permalink
gomobile: 2022-05-18 -> 0-unstable-2024-11-08
Browse files Browse the repository at this point in the history
  • Loading branch information
aucub committed Dec 9, 2024
1 parent 7ef9a6c commit fc82d13
Showing 1 changed file with 23 additions and 26 deletions.
49 changes: 23 additions & 26 deletions pkgs/development/mobile/gomobile/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
xcodeWrapperArgs ? { },
xcodeWrapper ? xcodeenv.composeXcodeWrapper xcodeWrapperArgs,
withAndroidPkgs ? true,
androidPkgs ? androidenv.composeAndroidPackages {
includeNDK = true;
ndkVersion = "22.1.7171670";
},
androidPkgs ? (
androidenv.composeAndroidPackages {
includeNDK = true;
}
),
}:

buildGoModule {
pname = "gomobile";
version = "unstable-2022-05-18";
version = "0-unstable-2024-11-08";

vendorHash = "sha256-AmOy3X+d2OD7ZLbFuy+SptdlgWbZJaXYEgO79M64ufE=";
vendorHash = "sha256-xTl8Hd1+GHRrUb5ktl1XkQa18HsHIeEvnujrcK0E1eU=";

src = fetchgit {
rev = "8578da9835fd365e78a6e63048c103b27a53a82c";
rev = "fa514ef75a0ffd7d89e1b4c9b45485f7bb39cf83";
name = "gomobile";
url = "https://go.googlesource.com/mobile";
sha256 = "sha256-AOR/p+DW83f2+BOxm2rFXBCrotcIyunK3UzQ/dnauWY=";
hash = "sha256-vuh6Rw27WA0BId+8JUqZdNCrvUH2sorvv15eIK/GFj0=";
};

subPackages = [
Expand Down Expand Up @@ -56,25 +56,22 @@ buildGoModule {
ln -s $src $out/src/golang.org/x/mobile
'';

postFixup =
''
for bin in $(ls $out/bin); do
wrapProgram $out/bin/$bin \
--suffix GOPATH : $out \
''
+ lib.optionalString withAndroidPkgs ''
--prefix PATH : "${androidPkgs.androidsdk}/bin" \
--set-default ANDROID_HOME "${androidPkgs.androidsdk}/libexec/android-sdk" \
''
+ ''
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ zlib ]}"
done
'';
postFixup = ''
for prog in gomobile gobind; do
wrapProgram $out/bin/$prog \
--suffix GOPATH : $out \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ zlib ]}" \
${lib.optionalString withAndroidPkgs ''
--prefix PATH : "${androidPkgs.androidsdk}/bin" \
--set-default ANDROID_HOME "${androidPkgs.androidsdk}/libexec/android-sdk"
''}
done
'';

meta = with lib; {
meta = {
description = "Tool for building and running mobile apps written in Go";
homepage = "https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile";
license = licenses.bsd3;
maintainers = with maintainers; [ jakubgs ];
license = with lib.licenses; [ bsd3 ];
maintainers = with lib.maintainers; [ jakubgs ];
};
}

0 comments on commit fc82d13

Please sign in to comment.