mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-17 12:12:17 +00:00
8fc6f4776b
90b18d4f...b124e2b4
fixes #19736
Corresponding go PR https://github.com/status-im/status-go/pull/5093
This commit fixes DNS resolution inside status-go by forcing pure go resolver at build time.
Reference -> https://pkg.go.dev/net#hdr-Name_Resolution
Store nodes must be available on Android & iOS app.
- Android
- iOS
status: ready
37 lines
895 B
Nix
37 lines
895 B
Nix
{ buildGoPackage
|
|
# object with source attributes
|
|
, meta, source}:
|
|
|
|
buildGoPackage {
|
|
pname = source.repo;
|
|
version = "${source.cleanVersion}-${source.shortRev}";
|
|
|
|
inherit meta;
|
|
inherit (source) src goPackagePath;
|
|
|
|
phases = ["unpackPhase" "configurePhase" "buildPhase"];
|
|
|
|
# https://pkg.go.dev/net#hdr-Name_Resolution
|
|
# https://github.com/status-im/status-mobile/issues/19736
|
|
# https://github.com/status-im/status-mobile/issues/19581
|
|
# TODO: try removing when go is upgraded to 1.22
|
|
GODEBUG = "netdns=cgo+2";
|
|
|
|
preBuild = ''
|
|
pushd go/src/$goPackagePath
|
|
go run cmd/library/*.go > $NIX_BUILD_TOP/main.go
|
|
popd
|
|
'';
|
|
|
|
# Build the Go library
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
go build \
|
|
-buildmode='c-archive' \
|
|
-tags='gowaku_skip_migrations gowaku_no_rln' \
|
|
-o "$out/libstatus.a" \
|
|
$NIX_BUILD_TOP/main.go
|
|
runHook postBuild
|
|
'';
|
|
}
|