diff --git a/nix/status-go/library/default.nix b/nix/status-go/library/default.nix index 24e77e3832..a6bd6d2204 100644 --- a/nix/status-go/library/default.nix +++ b/nix/status-go/library/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, meta, source, buildGoPackage }: +{ lib, stdenv, meta, source, buildGoPackage, + go-bindata, mockgen, protoc-gen-go, protobuf3_20 }: buildGoPackage { pname = source.repo; @@ -7,6 +8,10 @@ buildGoPackage { inherit meta; inherit (source) src goPackagePath; + nativeBuildInputs = [ + go-bindata mockgen protoc-gen-go protobuf3_20 + ]; + phases = ["unpackPhase" "configurePhase" "buildPhase"]; # https://pkg.go.dev/net#hdr-Name_Resolution @@ -22,6 +27,7 @@ buildGoPackage { preBuild = '' pushd go/src/$goPackagePath go run cmd/library/*.go > $NIX_BUILD_TOP/main.go + make generate SHELL=$SHELL GO111MODULE=on GO_GENERATE_CMD='go generate' popd ''; diff --git a/nix/status-go/mobile/build.nix b/nix/status-go/mobile/build.nix index 554a3296ba..6f3872f73c 100644 --- a/nix/status-go/mobile/build.nix +++ b/nix/status-go/mobile/build.nix @@ -1,5 +1,6 @@ { callPackage, lib, buildGoPackage , androidPkgs, openjdk, gomobile, xcodeWrapper, removeReferencesTo +, go-bindata, mockgen, protobuf3_20, protoc-gen-go , meta , source , platform ? "android" @@ -15,7 +16,7 @@ let isAndroid = platform == "android"; enforceXCodeAvailable = callPackage ./enforceXCodeAvailable.nix { }; -in buildGoPackage { +in buildGoPackage rec { pname = source.repo; version = "${source.cleanVersion}-${source.shortRev}-${platform}"; @@ -27,8 +28,9 @@ in buildGoPackage { __noChroot = isIOS; extraSrcPaths = [ gomobile ]; - nativeBuildInputs = [ gomobile removeReferencesTo ] - ++ optional isAndroid openjdk + nativeBuildInputs = [ + gomobile removeReferencesTo go-bindata mockgen protoc-gen-go protobuf3_20 + ] ++ optional isAndroid openjdk ++ optional isIOS xcodeWrapper; ldflags = goBuildLdFlags; @@ -44,6 +46,13 @@ in buildGoPackage { # TODO: try removing when go is upgraded to 1.22 GODEBUG = "netdns=cgo+2"; + preBuild = '' + echo 'Generate static files' + pushd go/src/$goPackagePath + make generate SHELL=$SHELL GO111MODULE=on GO_GENERATE_CMD='go generate' + popd + ''; + buildPhase = '' runHook preBuild echo -e "\nBuilding $pname for: ${concatStringsSep "," targets}" diff --git a/status-go-version.json b/status-go-version.json index f070e877b6..80190b8ccc 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": "v2.3.0", - "commit-sha1": "effde33d493ff52b66c8013067c9aa6444d84473", - "src-sha256": "1rd0mczdkvjm9pbmza234v1jy1bvqh3ni2xck1l42ha4sld2aqjl" + "version": "develop", + "commit-sha1": "ba37c32c07d1b05a94d1c7f7cb1b38fb82730f7b", + "src-sha256": "1f1bbw70iircicda9w0hch56hxr7p1vvzkrk58v8p5sq23xzdf6y" }