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.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 { };
|
||||
|
||||
# Package version adjustments
|
||||
go = super.pkgs.go_1_14;
|
||||
go = super.pkgs.go_1_16;
|
||||
gradle = super.pkgs.gradle_5;
|
||||
nodejs = super.pkgs.nodejs-12_x;
|
||||
openjdk = super.pkgs.openjdk8_headless;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{ lib, buildGo114Module, fetchFromGitHub }:
|
||||
{ lib, buildGo116Package, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
inherit (lib) strings;
|
||||
in buildGo114Module rec {
|
||||
in buildGo116Module rec {
|
||||
pname = "go-maven-resolver";
|
||||
version = "v1.1.1";
|
||||
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
{ stdenv, lib, fetchgit, buildGo114Module, zlib
|
||||
{ stdenv, lib, fetchgit, buildGo116Module, zlib
|
||||
, makeWrapper, xcodeWrapper, androidPkgs }:
|
||||
|
||||
buildGo114Module {
|
||||
buildGo116Module {
|
||||
pname = "gomobile";
|
||||
version = "2020-06-22";
|
||||
version = "2021-06-14";
|
||||
|
||||
vendorSha256 = "1n1338vqkc1n8cy94501n7jn3qbr28q9d9zxnq2b4rxsqjfc9l94";
|
||||
vendorSha256 = "1irgkgv72rakg7snk1bnp10ibr64ykz9l40s59l4fnl63zsh12a0";
|
||||
|
||||
src = fetchgit {
|
||||
# WARNING: Next commit removes support for ARM 32 bit builds for iOS
|
||||
rev = "33b80540585f2b31e503da24d6b2a02de3c53ff5";
|
||||
rev = "7c8f154d100840bc5828285bb390bbae1cb5a98c";
|
||||
name = "gomobile";
|
||||
url = "https://go.googlesource.com/mobile";
|
||||
sha256 = "0c9map2vrv34wmaycsv71k4day3b0z5p16yzxmlp8amvqb38zwlm";
|
||||
sha256 = "1w9mra1mqf60iafp0ywvja5196fjsjyfhvz4yizqq4qkyll5qmj1";
|
||||
};
|
||||
|
||||
patches = [ ./resolve-nix-android-sdk.patch ];
|
||||
|
||||
subPackages = [ "bind" "cmd/gobind" "cmd/gomobile" ];
|
||||
|
||||
# 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
|
||||
# object with source attributes
|
||||
, meta, source
|
||||
|
@ -20,7 +20,7 @@ let
|
|||
# formatted for use with -target
|
||||
targetArchs = map (a: "${platform}/${a}") architectures;
|
||||
|
||||
in buildGo114Package {
|
||||
in buildGo116Package {
|
||||
pname = source.repo;
|
||||
version = "${source.cleanVersion}-${source.shortRev}-${platform}";
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
ios = callPackage ./build.nix {
|
||||
platform = "ios";
|
||||
# amd64 is for ios simulator
|
||||
architectures = [ "arm" "arm64" "amd64" ];
|
||||
architectures = [ "arm64" "amd64" ];
|
||||
outputFileName = "Statusgo.framework";
|
||||
inherit meta source goBuildFlags goBuildLdFlags;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue