anchor.diff:    postPatch = ''
       substituteInPlace cmd/gomobile/env.go --replace \
         'tmpdir, err = ioutil.TempDir("", "gomobile-work-")' \
  -      'tmpdir = filepath.Join(os.Getenv("NIX_BUILD_TOP"), "gomobile-work")' \
  -      --replace '"io/ioutil"' ""
  +      'tmpdir = filepath.Join(os.Getenv("NIX_BUILD_TOP"), "gomobile-work")'
       substituteInPlace cmd/gomobile/init.go --replace \
         'tmpdir, err = ioutil.TempDir(gomobilepath, "work-")' \
         'tmpdir = filepath.Join(os.Getenv("NIX_BUILD_TOP"), "work")'
  
positive.code:   postInstall = ''
      mkdir -p $out/src/golang.org/x
      ln -s $src $out/src/golang.org/x/mobile
      wrapProgram $out/bin/gomobile \
    '' + 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" \
    '' + ''
        --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ zlib ]}"
    '';
  
    meta = with lib; {
  
negative.code: 
  buildGoModule {
    pname = "gomobile";
    version = "unstable-2022-05-18";
  
    vendorSha256 = "sha256-AmOy3X+d2OD7ZLbFuy+SptdlgWbZJaXYEgO79M64ufE=";
  
    src = fetchgit {
      rev = "8578da9835fd365e78a6e63048c103b27a53a82c";
      name = "gomobile";
      url = "https://go.googlesource.com/mobile";
      sha256 = "sha256-AOR/p+DW83f2+BOxm2rFXBCrotcIyunK3UzQ/dnauWY=";
    };
  
    subPackages = [ "bind" "cmd/gobind" "cmd/gomobile" ];
  