mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-12 17:54:32 +00:00
nix: upgrade Go 1.14 to 1.16, gomobile to 2021-02-20
With upgrade to Go above `1.15` and Gomobile we now drop support for darwin/arm32 builds. This means all devices like iPhone 5 or older. For more details see: https://tip.golang.org/doc/go1.15#darwin Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
1e4c1a5598
commit
625866e50b
@ -18,11 +18,4 @@
|
|||||||
|
|
||||||
# Android SDK requires an accepted license
|
# Android SDK requires an accepted license
|
||||||
android_sdk.accept_license = true;
|
android_sdk.accept_license = true;
|
||||||
|
|
||||||
permittedInsecurePackages = [
|
|
||||||
# Android Env still needs old OpenSSL
|
|
||||||
"openssl-1.0.2u"
|
|
||||||
# Support for Go 1.14 ended with the release of Go 1.16
|
|
||||||
"go-1.14.15"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ in {
|
|||||||
gradlePropParser = callPackage ./tools/gradlePropParser.nix { };
|
gradlePropParser = callPackage ./tools/gradlePropParser.nix { };
|
||||||
|
|
||||||
# Package version adjustments
|
# Package version adjustments
|
||||||
go = super.pkgs.go_1_14;
|
go = super.pkgs.go_1_16;
|
||||||
gradle = super.pkgs.gradle_5;
|
gradle = super.pkgs.gradle_5;
|
||||||
nodejs = super.pkgs.nodejs-12_x;
|
nodejs = super.pkgs.nodejs-12_x;
|
||||||
openjdk = super.pkgs.openjdk8_headless;
|
openjdk = super.pkgs.openjdk8_headless;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{ lib, buildGo114Module, fetchFromGitHub }:
|
{ lib, buildGo116Package, fetchFromGitHub }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) strings;
|
inherit (lib) strings;
|
||||||
in buildGo114Module rec {
|
in buildGo116Module rec {
|
||||||
pname = "go-maven-resolver";
|
pname = "go-maven-resolver";
|
||||||
version = "v1.1.1";
|
version = "v1.1.1";
|
||||||
|
|
||||||
|
@ -1,22 +1,19 @@
|
|||||||
{ stdenv, lib, fetchgit, buildGo114Module, zlib
|
{ stdenv, lib, fetchgit, buildGo116Module, zlib
|
||||||
, makeWrapper, xcodeWrapper, androidPkgs }:
|
, makeWrapper, xcodeWrapper, androidPkgs }:
|
||||||
|
|
||||||
buildGo114Module {
|
buildGo116Module {
|
||||||
pname = "gomobile";
|
pname = "gomobile";
|
||||||
version = "2020-06-22";
|
version = "2021-06-14";
|
||||||
|
|
||||||
vendorSha256 = "1n1338vqkc1n8cy94501n7jn3qbr28q9d9zxnq2b4rxsqjfc9l94";
|
vendorSha256 = "1irgkgv72rakg7snk1bnp10ibr64ykz9l40s59l4fnl63zsh12a0";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
# WARNING: Next commit removes support for ARM 32 bit builds for iOS
|
rev = "7c8f154d100840bc5828285bb390bbae1cb5a98c";
|
||||||
rev = "33b80540585f2b31e503da24d6b2a02de3c53ff5";
|
|
||||||
name = "gomobile";
|
name = "gomobile";
|
||||||
url = "https://go.googlesource.com/mobile";
|
url = "https://go.googlesource.com/mobile";
|
||||||
sha256 = "0c9map2vrv34wmaycsv71k4day3b0z5p16yzxmlp8amvqb38zwlm";
|
sha256 = "1w9mra1mqf60iafp0ywvja5196fjsjyfhvz4yizqq4qkyll5qmj1";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./resolve-nix-android-sdk.patch ];
|
|
||||||
|
|
||||||
subPackages = [ "bind" "cmd/gobind" "cmd/gomobile" ];
|
subPackages = [ "bind" "cmd/gobind" "cmd/gomobile" ];
|
||||||
|
|
||||||
# Fails with: go: cannot find GOROOT directory
|
# Fails with: go: cannot find GOROOT directory
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
diff --git a/cmd/gomobile/bind_androidapp.go b/cmd/gomobile/bind_androidapp.go
|
|
||||||
index 3b01adc..76216fa 100644
|
|
||||||
--- a/cmd/gomobile/bind_androidapp.go
|
|
||||||
+++ b/cmd/gomobile/bind_androidapp.go
|
|
||||||
@@ -372,6 +372,10 @@ func androidAPIPath() (string, error) {
|
|
||||||
var apiVer int
|
|
||||||
for _, fi := range fis {
|
|
||||||
name := fi.Name()
|
|
||||||
+ // Resolve symlinked directories (this is how the Nix Android SDK package is built)
|
|
||||||
+ if fi2, err := os.Stat(filepath.Join(sdkDir.Name(), name)); err == nil {
|
|
||||||
+ fi = fi2
|
|
||||||
+ }
|
|
||||||
if !fi.IsDir() || !strings.HasPrefix(name, "android-") {
|
|
||||||
continue
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, utils, callPackage, buildGo114Package
|
{ lib, stdenv, utils, callPackage, buildGo116Package
|
||||||
, go, androidPkgs, openjdk, gomobile, xcodeWrapper
|
, go, androidPkgs, openjdk, gomobile, xcodeWrapper
|
||||||
# object with source attributes
|
# object with source attributes
|
||||||
, meta, source
|
, meta, source
|
||||||
@ -20,7 +20,7 @@ let
|
|||||||
# formatted for use with -target
|
# formatted for use with -target
|
||||||
targetArchs = map (a: "${platform}/${a}") architectures;
|
targetArchs = map (a: "${platform}/${a}") architectures;
|
||||||
|
|
||||||
in buildGo114Package {
|
in buildGo116Package {
|
||||||
pname = source.repo;
|
pname = source.repo;
|
||||||
version = "${source.cleanVersion}-${source.shortRev}-${platform}";
|
version = "${source.cleanVersion}-${source.shortRev}-${platform}";
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
ios = callPackage ./build.nix {
|
ios = callPackage ./build.nix {
|
||||||
platform = "ios";
|
platform = "ios";
|
||||||
# amd64 is for ios simulator
|
# amd64 is for ios simulator
|
||||||
architectures = [ "arm" "arm64" "amd64" ];
|
architectures = [ "arm64" "amd64" ];
|
||||||
outputFileName = "Statusgo.framework";
|
outputFileName = "Statusgo.framework";
|
||||||
inherit meta source goBuildFlags goBuildLdFlags;
|
inherit meta source goBuildFlags goBuildLdFlags;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user