Commit Graph

9 Commits

Author SHA1 Message Date
Jakub Sokołowski c147b807ef
nix: drop KEYSTORE_PATH from extra-sandbox-paths
This is no longer necessary as we sign APKs in a separate step using the
`scripts/sign-android.sh` script, and this causes issues for F-Droid builds.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-09-20 12:23:07 +02:00
Jakub Sokołowski 5903cf73fb
nix: stop passing watchman socket to Nix builds
This passing of Watchman socket was implemented in order to avoid this:
```
Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:204:21)
Emitted 'error' event on NodeWatcher instance at:
    at NodeWatcher.checkedEmitError (/private/tmp/nix-build-status-mobile-build-nightly-android.drv-0/node_modules/sane/src/node_watcher.js:143:12)
    at FSWatcher.emit (node:events:527:28)
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:210:12) {
  errno: -24,
  syscall: 'watch',
  code: 'EMFILE',
  filename: null
}
```
Which is caused by `jest-haste-map` used by `metro` starting to watch
the filesystem for file changes, which is pointless when doing a
one-off build using Nix.

But by setting `CI=true` we can make `metro` not start this waching of
files in the first place, removing the need for use of Watchman entirely.

By entirely dropping use of Watchman we also fix the following issue:
```
[cli] unable to talk to your watchman on /tmp/tmp-status-mobile-ABC/jenkins-state/sock! (Permission denied)
```
Which happens on multi-user Nix installations becuase the user that the
Nix build is executed as is not the same as the user that starts
Watchman and creates the socket file.

Issue: https://github.com/status-im/status-mobile/issues/13783

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-08-10 02:21:12 +02:00
Jakub Sokołowski c27a74e378
nix: quote path uses to avoid issues with spaces
This is most important on MacOS, but in general is a good idea.

Resolves:
https://github.com/status-im/status-mobile/issues/13715

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-07-27 16:11:28 +02: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
Pedro Pombeiro c18e2f8a09
Minor fixes in Nix 2019-06-13 15:03:44 +02:00
Jakub Sokołowski b51b565cdb
add dockerimage for building android
- remove unused android-ndk toolchains
- add build.sh and test target for easy testing of image
- separate generic parts into a base image
- pass keystore credentials via env variables

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-01-16 17:36:13 +01:00
Julien Eluard fc92dafca6 Fixed android build script.
Upgraded to latest dependencies and removed useless plugins.
2018-01-17 14:56:52 +01:00
Pedro Pombeiro 0d83aeda8d
scripts: Improve `bundle-status-go.sh` so that it can bundle Android package as well (#2539)
Signed-off-by: Oskar Thoren <ot@oskarthoren.com>
2018-01-13 00:54:49 +09:00
Julien Eluard 518f68f08f Added build scripts 2017-12-12 09:05:18 +01:00