Commit Graph

292 Commits

Author SHA1 Message Date
Jakub Sokołowski 789b24e3a4
nix: add script for adding missing Gradle packages
This handles the usual case where a missing Gradle version causes the
call to `make nix-update-gradle` to fail since call to Gradle also fails.

This is simpler than getting a dev to run commands manually.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-06-09 13:07:51 +02:00
Jakub Sokołowski 6dd1577b8a
nix: cleanup status-go mobile build derivation
While working on Nix builds for `go-waku` I figured this derivation
could use some cleanup, to make it shorter and more readable.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-06-07 23:34:35 +02:00
Jakub Sokołowski f402f67b09
nix: nixpgs upgrade, Android SDK fixes, Coreutils 9.1
Notable version changes:

- Coreutils `9.0` to `9.1`
- OpenSSL `1.1.1n` to `1.1.1o`
- NodeJS `16.14.2` to `16.15.1`
- Clojure `1.11.1.1107` to `1.11.1.1113`
- Ruby `2.7.5p203` to `2.7.6p219`
- Cocoapods `1.11.0` to `1.11.3`
- Git `2.35.1` to `2.36.1`
- Curl `7.82.0` to `7.83.1`
- Android SDK Platform Tools `31.0.3` to `33.0.1`

Most important is the Coreutils upgrade to 9.1 which includes a fix for
iOS builds on new M1 ARM64 processors:
https://github.com/status-im/status-react/issues/12799

Also fixes broken Android SDK builds on Linux due to `auto-patchelf-hook` change:
https://github.com/NixOS/nixpkgs/pull/163924

I've fixed this in `nixpkgs` PR:
https://github.com/NixOS/nixpkgs/pull/173376

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-06-03 10:33:41 +02:00
Jakub Sokołowski 5d9a29b3c8
nix: cleanup of unused variables
Mostly achieved by running via `nix-linter`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-31 12:03:20 +02:00
Jakub Sokołowski bcf3e3205a
nix: lock Go builders at 1.17.x
If we keep using specific `buildGo117Package` we can easily forge to
upgrade when we bump the Go compiler itself. By locking those explicitly
in `overlay.nix` we make sure they all get bumped together.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-31 12:03:19 +02:00
Andrea Maria Piana e4cba0f663
Add status-go tests
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2022-05-25 17:59:02 +01:00
Jakub Sokołowski acfa73ab43
nix: build unsigned Android APK, sign separately
This has several benefits:

* Less abuse of `extra-sandbox-paths` Nix option
* Less inputs to the Android release build derivation
* Easier for users to sign the build themselves
* Simplification of `scripts/release-android.sh`
* Preparation for building using Nix Flakes

The only two remaining credentials passed via `extra-sandbox-paths` is
the Infura and OpenSea API keys, and there is no way around that other
than passing them via Nix arguments, but that would cause them to end up
in `/nix/store` as part of `.drv` files.

I'm also renaming `release-fdroid` to `build-fdroid` to be consistent.

Depends on: https://github.com/status-im/status-jenkins-lib/pull/42

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-21 11:10:11 +02:00
andrey f39b688e89
google free and metrics free
Signed-off-by: andrey <motor4ik@gmail.com>
2022-05-19 07:22:23 +02:00
Jakub Sokołowski 43f7aaf8b1
nix: limit jobs used by parallel to update Gradle
Otherwise on some devices with with good connecitons rate limiting might
cause failures to fetch POMs or JARs and in result failing the whole update.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-18 11:03:29 +02:00
Jakub Sokołowski 372942ba8a
nix: fortify the nix-update-gradle process
This fixes two issues with the `nix-update-gradle` target:

* It now fails when a JAR is missing which used to be ignored.
* It ignores dependencies that have no JARs, like Eclipse plugins.

This makes the process more robust, since we can see something is
missing right away, and a developer may re-run the process to take
account of possible temporary networking failures or rate limiting.

It also slims down the size of the `deps.json` by removing dependencies
which contribute no actual JARs or AARs to the build process.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-17 20:04:04 +02:00
Jakub Sokołowski b2695e0b24
nix: fix purge.sh script on Darwin platform
Darwin lacks `userdel` and Nix users don't appear in `/etc/passwd`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-16 20:18:23 +02:00
andrey 09d393dabe
[#13331] Back button changes in chat view when scrolling (iOS)
[#13330] Wallet buttons are overlapped with tabs buttons in the individual wallet account view (iOS)

Signed-off-by: andrey <motor4ik@gmail.com>
2022-05-11 16:22:29 +02:00
Jakub Sokołowski d765dd1f60
ci: use nix copy instead of nix-copy-closure
Also use `ssh-ng://` protocol implementation instead of `ssh://`.
Might fix the following error:
```
error (ignored): error: reached end of FramedSource
error: sized: unexpected end-of-file
error: unexpected end-of-file
```
For more details see: https://github.com/NixOS/nix/issues/6495

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-09 13:21:46 +02:00
Jakub Sokołowski 777d0581ce
nix: upgrade from 2.6.1 to 2.8.0
Minor upgrade done to match the version deployed in CI due to a bug
with `nix-copy-closure` which broken Nix cache jobs:
https://github.com/status-im/infra-ci/issues/49

This will not force upgrade on developes, nor require any `make nix-purge`.
If however and upgrade is wanted it can be simply done with `nix upgrade-nix`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-07 11:24:58 +02:00
Jakub Sokołowski 6f45b5c8e8
ci: upgarde to Xcode 13.3.1
App store now requires all applications to be built with XCode 13:
https://developer.apple.com/news/?id=2t1chhp3

Related: https://github.com/status-im/infra-ci/issues/48

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-06 19:27:22 +02:00
Jakub Sokołowski 1b5f08d680
Gradle: drop unavailable JCenter Bintray from config
This repository has been shut down a year ago:

* https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
* https://testfairy.com/blog/jcenter-and-bintray-is-shutting-down-what-to-do/

And yet we still keep references to it in the Gradle config.

Resolves: https://github.com/status-im/status-react/issues/13320

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-05 11:50:50 +02:00
Jakub Sokołowski 1e8d85983e
nix: upgrade Nixpkgs, Go and Node.js
Notable software upgrades:

- Go `1.16.8` to `1.17.3`
- NodeJS `12.22.7` to `16.14.2`
- OpenJDK `8u272-b10` to `8u322-ga`
- Clojure `1.10.3.1029` to `1.11.1.1107`
- Git `2.33.1` to `2.35.1`
- CMake `3.18.1` to `3.22.3`
- Curl `7.79.1` to `7.82.0`
- GNU Awk `5.1.0` to `5.1.1`

The Go upgrade is done in advance of upgrade to `1.18.1`.
The Node.js upgrade is done since `12.x` security support [is over](https://endoflife.date/nodejs).

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-04 16:51:32 +02:00
Jakub Sokołowski d459f6c318
nix: upgrade Gems, Pods, and Gradle dependencies
This is done to help with debugging dependency issues in:
https://github.com/status-im/status-react/pull/13303

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-04-27 11:57:19 +04:00
Jakub Sokołowski 0311983751
ci: upgrade Nix from 2.3.12 to 2.6.1
Due to changes in how Nix handles Git refs we need to specify
`refs/tags/` prefix in `package.json` to avoid the following error:
```
fatal: couldn't find remote ref refs/heads/v2.0.3-status-v6
error: program 'git' failed with exit code 128
```

I also had to rewrite some logic in `nix/scripts/source.sh` in order to
take account of single-user and multi-user installations.
We default to multi-user for Darwin, but not for any other OS due to
discovered issues with `nix-daemon` socket on Arch and open file limits.

I also rewrote `nix/scripts/setup.sh` and `/nix/scripts/purge.sh` to support
different types of installations. Both single-user and multi-user, as some
operating systems have issues with multi-user installations.

Resolves: https://github.com/status-im/status-react/issues/12832
Depends on: https://github.com/status-im/status-jenkins-lib/pull/37

Related changes:
* https://github.com/status-im/infra-ci/commit/84947b9f
* https://github.com/status-im/infra-ci/commit/bb98f5f3
* https://github.com/status-im/infra-ci/commit/f75d524d
* https://github.com/status-im/infra-ci/commit/d1fc92cd
* https://github.com/status-im/infra-ci/commit/87c4091e
* https://github.com/status-im/infra-ci/commit/8d6b6b3f
* https://github.com/status-im/infra-ci/commit/c4f13285
* https://github.com/status-im/infra-ci/commit/38ac698d

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-04-11 12:26:54 +02:00
Jakub Sokołowski da76200433
nix: fix setup.sh script when running on MacOS
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-04-11 11:10:28 +02:00
Jakub Sokołowski cd24bc013f
nix: fix call to status-go derivation
New argument added to pass the `secretsFile` was not added here:
https://github.com/status-im/status-react/pull/13144

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-03-22 11:01:10 +01:00
Roman Volosovskyi aa72ac5747
[#13016] Pass opensea key from env
Signed-off-by: andrey <motor4ik@gmail.com>
2022-03-21 13:59:35 +01:00
andrey a2497c81e7
[#13116] Load audio messages from http server
Signed-off-by: andrey <motor4ik@gmail.com>
2022-03-01 17:07:40 +01:00
Parvesh Monu 36c7d8e4ca
Implementation of remote android notifications (#13028) 2022-02-14 17:27:33 +05:30
Michele Balistreri 52afbf46ee
get images over HTTPS with self-signed certificate
Co-Authored-By: andrey <motor4ik@gmail.com>
Signed-off-by: Michele Balistreri <michele@bitgamma.com>
2022-02-10 18:41:10 +01:00
Michele Balistreri 2c38c74c16
* update react-native-webview
* more robust send-to-bridge

Signed-off-by: Michele Balistreri <michele@bitgamma.com>
2022-01-14 13:49:06 +03:00
Jakub Sokołowski 89d42b9ef4
nix: fix gomobile builds requiring Android SDK
This works fine on `x86_64`, but will fail when used on `aarch64`.

Issue: https://github.com/status-im/status-react/issues/12794

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-26 16:22:57 +01:00
Jakub Sokołowski d0f76c5412
nix: upgrade nixpkgs to current master
Notable package upgrades:

| Software  | Old          | New           |
|-----------|--------------|---------------|
| Glibc     | `2.32`       | `2.33`        |
| BinUtils  | `2.35.1`     | `2.35.2`      |
| CoreUtils | `8.32`       | `9.0`         |
| OpenSSL   | `1.1.1k`     | `1.1.1l`      |
| Git       | `2.31.1`     | `2.33.1`      |
| GCC       | `8.4.0`      | `8.5.0`       |
| Clojure   | `1.10.3.855` | `1.10.3.1029` |
| Node.js   | `12.22.1`    | `12.22.7`     |
| Yarn      | `1.22.10`    | `1.22.17`     |

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-26 16:22:45 +01:00
andrey 437d58f827
use react-native-fast-image for stickers
Signed-off-by: andrey <motor4ik@gmail.com>
2021-11-17 15:44:27 +01:00
Jakub Sokołowski f448f014f6
nix: update gradle dependencies
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-16 11:25:07 +01:00
Jakub Sokołowski 43da5a60fe
nix: make url2json.sh parse POM content for packaging
Otherwise we can download a JAR when an AAR is necessary.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-16 11:12:06 +01:00
Jakub Sokołowski 179f1d26ae
nix: remove obsolete references to Nimbus sources
This used to be a project to integrate Nimbus with mobile, but it was abandoned.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-15 13:17:30 +01:00
Jakub Sokołowski bdfb7e296b
nix: fix status-go override not passing to Nix build
Incorrect reference to `nimbus.src-override` causes Gradle builds to fail with:
```
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve status-im:status-go:e940434.
```
Due to this `if` clause not triggering:
a573ae70e5/modules/react-native-status/android/build.gradle (L4-L8)

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-15 12:11:11 +01:00
Jakub 9b5cbf8258
nix: avoid nesting of Nix shells, show errors (#12796)
Nesting of Nix shells does not work, since we have no way to safely do
that without starting an infinite loop of nested Nix shells.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-05 12:59:33 +00:00
Jakub Sokołowski 3f7b985e1a
nix: update gradle dependencies
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-10-26 15:40:25 +02:00
Jakub Sokołowski edb3ed4ed2
nix: upgrade go-maven-resolver to 1.1.2
Fixes and issue with HTML entity characters in POMs.

https://github.com/status-im/go-maven-resolver/pull/6
https://github.com/status-im/go-maven-resolver/releases/tag/v1.1.2

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-10-26 15:39:55 +02:00
Jakub Sokołowski 200eb189ea
nix: fix use of androidPkgs in gradle shell
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-10-26 15:39:54 +02:00
Jakub Sokołowski e2c18ea151
add commit hash to app metadata for Android and iOS
This will make identifying installed software easier.
It can also be used to generate F-Droid RPs more easily.

Depends on:
https://github.com/status-im/status-jenkins-lib/pull/35

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-21 11:48:45 +02:00
Jakub Sokołowski a1ede3528f
nix: drop our gomobile in favor of one from nixpkgs
I've created PRs to include gomobile in official nixpkgs:

* https://github.com/NixOS/nixpkgs/pull/116747
* https://github.com/NixOS/nixpkgs/pull/131042

Hence I'm removing our own implementation to use that one.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-14 11:31:17 +02:00
Jakub Sokołowski 5e9c7da96c
nix: upgrade nixpkgs, clean up android sdk config
Notable upgrades:

| Package        | Previous    | Current     |
|----------------|-------------|-------------|
| `glibc`        | `2.32`      | `2.33`      |
| `git`          | `2.31.1`    | `2.32.0`    |
| `clojure`      | `1.10.3.855`| `1.10.3.943`|
| `nodejs`       | `12.22.1`   | `12.22.6`   |
| `yarn`         | `1.22.10`   | `1.22.11`   |
| Platform Tools | `31.0.2`    | `31.0.3`    |
| Build Tools    | `30.0.3`    | `31.0.0`    |

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-14 10:53:36 +02:00
Jakub Sokołowski 88dc152e73
nix: rafactor android-sdk to provide sdk/ndk outputs
This makes path shorter.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-14 10:52:41 +02:00
Michele Balistreri 5246617c69
target SDK 30
support scoped storage from Android 10

better permission handling on iOS 14

Signed-off-by: Michele Balistreri <michele@bitgamma.com>
2021-09-13 10:17:51 +03:00
Jakub Sokołowski 625866e50b
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>
2021-07-20 11:17:45 +02:00
Jakub Sokołowski ec54de8f63
nix: refactor gomobile to be built with buildGo114Module
This simplifies the package, and also drops the need for `deps.nix` file.
It also slims down the #11986 Go upgrade PR for easier debugging.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-06-30 18:50:05 +02:00
Jakub Sokołowski 0d403739f9
nix: upgrade go-maven-resolver to 1.1.1, add more repos
I've noticed issues with the https://repository.sonatype.org/ Maven repository we were using.
They appear to have purged their storage of a lot of packages, including our own for example:
https://repository.sonatype.org/content/groups/sonatype-public-grid/com/github/status-im/

For this reason I've release a new version of `go-maven-resolver` that includes two more Maven repos:
- https://plugins.gradle.org/m2
- https://jitpack.io

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-06-30 18:49:55 +02:00
Jakub Sokołowski 0652d18653
nix: upgrade nixpkgs, keep Go at 1.14.15
Notable software upgrades:

- Go `1.14.13` to `1.14.15`
- Clojure `1.10.1.763` to `1.10.3.855`
- NodeJS `12.20.1` to `12.22.1`
- Git `2.29.2` to `2.31.1`
- CMake `3.10.2` to `3.18.1`
- Curl `7.74.0` to `7.76.1`
- Android NDK `21.3.6528147` to `22.1.7171670`
- Android Platform Tools `30.0.5` to `31.0.2`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-06-15 17:49:33 +02:00
Jakub Sokołowski f9d697dd2e
nix: upgrade Nix 2.3.6 to 2.3.12
This should also fix issues with MacOS sandboxing:
```
sandbox-exec: execvp() of '/nix/store/...-bash-4.4-p23/bin/bash' failed: Operation not permitted
```
https://github.com/cachix/install-nix-action/issues/15

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-06-15 17:49:27 +02:00
andrey 5f719ac95b
react native navigation
Signed-off-by: andrey <motor4ik@gmail.com>
2021-06-14 20:03:49 +02:00
Jakub Sokołowski e30ca97184
nix: drop references to nix-cache-cn.status.im
See:
https://github.com/status-im/infra-ci/commit/faaf051b

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-05-25 17:53:47 +02:00
Jakub Sokołowski 6d43f34cf8
nix/deps/gradle: include Gradle targets with numbers in names
This fixes an issue first detected in:
https://github.com/status-im/status-react/pull/12141

Which resulted in dependencies being ignored for `react-native-nagivation`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-05-25 14:33:41 +02:00