diff --git a/nix/status-go/library/default.nix b/nix/status-go/library/default.nix index 049a5ea9c4..3cda15cdd6 100644 --- a/nix/status-go/library/default.nix +++ b/nix/status-go/library/default.nix @@ -20,7 +20,11 @@ buildGoPackage { # Build the Go library buildPhase = '' runHook preBuild - go build -buildmode=c-archive -o $out/libstatus.a $NIX_BUILD_TOP/main.go + go build \ + -buildmode='c-archive' \ + -tags='gowaku_skip_migrations' \ + -o "$out/libstatus.a" \ + $NIX_BUILD_TOP/main.go runHook postBuild ''; } diff --git a/nix/status-go/mobile/build.nix b/nix/status-go/mobile/build.nix index 3dbd0e1e54..ffd1d64470 100644 --- a/nix/status-go/mobile/build.nix +++ b/nix/status-go/mobile/build.nix @@ -11,6 +11,9 @@ let inherit (lib) concatStringsSep optionalString optional; + isIOS = platform == "ios"; + isAndroid = platform == "android"; + in buildGoPackage { pname = source.repo; version = "${source.cleanVersion}-${source.shortRev}-${platform}"; @@ -20,30 +23,32 @@ in buildGoPackage { # Sandbox causes Xcode issues on MacOS. Requires sandbox=relaxed. # https://github.com/status-im/status-mobile/pull/13912 - __noChroot = (platform == "ios"); + __noChroot = isIOS; extraSrcPaths = [ gomobile ]; nativeBuildInputs = [ gomobile removeReferencesTo ] - ++ optional (platform == "android") openjdk - ++ optional (platform == "ios") xcodeWrapper; + ++ optional isAndroid openjdk + ++ optional isIOS xcodeWrapper; ldflags = concatStringsSep " " goBuildLdFlags; - ANDROID_HOME = optionalString (platform == "android") androidPkgs.sdk; + ANDROID_HOME = optionalString isAndroid androidPkgs.sdk; # Ensure XCode is present for iOS, instead of failing at the end of the build. - preConfigure = optionalString (platform == "ios") utils.enforceXCodeAvailable; + preConfigure = optionalString isIOS utils.enforceXCodeAvailable; buildPhase = '' runHook preBuild echo -e "\nBuilding $pname for: ${concatStringsSep "," targets}" + set -x gomobile bind \ ${concatStringsSep " " goBuildFlags} \ -ldflags="$ldflags" \ -target=${concatStringsSep "," targets} \ - ${optionalString (platform == "android") "-androidapi=${platformVersion}"} \ - ${optionalString (platform == "ios") "-iosversion=${platformVersion}"} \ + ${optionalString isAndroid "-androidapi=${platformVersion}" } \ + ${optionalString isIOS "-iosversion=${platformVersion}" } \ + -tags='${optionalString isIOS "nowatchdog"} gowaku_skip_migrations' \ -o ${outputFileName} \ ${source.goPackagePath}/mobile @@ -58,7 +63,7 @@ in buildGoPackage { # Drop govers from disallowedReferences. dontRenameImports = true; # Replace hardcoded paths to go package in /nix/store. - preFixup = optionalString (platform == "ios") '' + preFixup = optionalString isIOS '' find $out -type f -exec \ remove-references-to -t $disallowedReferences '{}' + || true ''; diff --git a/status-go-version.json b/status-go-version.json index 00537c7357..a519cccd0b 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "bfab85f73bfa727db5b6e8078f9ce9ec191161ca", - "commit-sha1": "bfab85f73bfa727db5b6e8078f9ce9ec191161ca", - "src-sha256": "184zcv531cgwdg7zr7ryav7w9qwd90jgqb9nmmhy4l2pmcm1mlc9" + "version": "91aac3cec0c1d74f09cf8d108105ba311552723d", + "commit-sha1": "91aac3cec0c1d74f09cf8d108105ba311552723d", + "src-sha256": "0j9vl7alb4rf3zk0bak12s3bdfwgih4fq9yaw7wkinmz03rqx2wg" }