Commit Graph

367 Commits

Author SHA1 Message Date
Anton Iakimov 07d037f2e1
nix: downgrade watchman to 4.9.0
watchman was upgraded significantly during the last #14944 (4.9.0 (Aug 16, 2017) to 2023.01.30.00 - 6 years between):
status-im/nixpkgs@4e9c02b

Probably causing developers to have "too many files open" issue #16341

This PR is an attempt to fix the issue by downgrading the watchman

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-07-02 08:46:28 +02:00
Jakub Sokołowski 1503f6b250
nix: use Darwin stat command explicitly
Otherwise if in Nix context we can accidentally use GNU stat which
results in a different output due to different command line flags:
```
[nix-shell:~/status-mobile]$ stat -Lf "%Sg" "/nix/store"
stat: cannot read file system information for '%Sg': No such file or directory
  File: "/nix/store"
    ID: 10000110000001a Namelen: ?       Type: apfs
Block size: 4096       Fundamental block size: 4096
Blocks: Total: 242837545  Free: 199242283  Available: 199242283
Inodes: Total: 7971454780 Free: 7969691320
```
And it should be just owner group name or ID. Which in turn results in:
```
Unknown Nix installtion type!
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-27 13:25:41 +02:00
Anton Iakimov 5dcd64c478
nix: fix Android SDK on Darwin with nixpkgs system override
Android SDK in nixpkg doesn't support `aarch64-darwin`, for details see
https://github.com/status-im/status-mobile/issues/12794

The workaround was to run terminal application with Rosetta or make with `aarch` tool.

This PR overrides system architecture to always be `x86_64` for Android shell and build targets ran by make.
CI is not affected as it runs `nix` directly.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-26 17:33:44 +02:00
Siddarth Kumar 1c50dc7067
nix: skip git-lfs checks failing on darwin
On macOS `git-lfs` checks fail sometimes and they also take a lot of time to execute.

```log
FAIL    github.com/git-lfs/git-lfs/v3/lfshttp   0.820s
FAIL
error: builder for '/nix/store/abd6spw876qvcmlpcwsljsnbpbnvx1fg-git-lfs-3.3.0.drv' failed with exit code 1;
       last 10 log lines:
       >          Error Trace:    certs_test.go:210
       >              Error:          Expected value not to be nil.
       >          Test:           TestCertFromSSLCAPathEnv
       >     certs_test.go:210:
       >               Error Trace:    certs_test.go:210
       >              Error:          Expected value not to be nil.
       >          Test:           TestCertFromSSLCAPathEnv
       > FAIL
       > FAIL    github.com/git-lfs/git-lfs/v3/lfshttp   0.820s
       > FAIL
       For full logs, run 'nix-store -l /nix/store/abd6spw876qvcmlpcwsljsnbpbnvx1fg-git-lfs-3.3.0.drv'.
```
Failures initially observed by me and @smohamedjavid and then today again reported by @yqrashawn

This commit adds a `nix` overlay that skips those checks
2023-06-26 10:49:32 +02:00
Ibrahem 125d3239de
nix: build derivation from sources if cache fails
This is a workaround for a well known issue of Nix failing to download
bigger packages from Nix cache due to errors like this:
```
HTTP error 200 (curl error: Transferred a partial file)
```
or
```
HTTP error 200 (curl error: Stream error in the HTTP/2 framing layer)
```
From docs: https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-fallback

>If set to true, Nix will fall back to building from source if a binary
>substitute fails. This is equivalent to the --fallback flag. The default is false.

Realted: https://github.com/status-im/infra-ci/issues/17

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-25 23:34:59 +02:00
Anton Iakimov 7e56e35f56
nix: add missing Apple SDKs to fix make test on macOS
Fixes following error:
```
ld: framework not found IOKit
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [status_nodejs_addon.target.mk:175: Release/status_nodejs_addon.node] Error 1
```
The `make test` target started to fail on macOS after #14944.

This PR adds 2 Apple SDK frameworks to default shell: `IOKit` and `CoreServices`

The other 2 mentioned in `binding.gyp` are not added, but build is ok.

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

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-24 10:56:21 +02:00
Jakub Sokołowski 5e6d488a3e
nix: fix cache usage by modifying global config
Otherwise Nix produces warnings like this:
```
warning: ignoring untrusted substituter 'https://nix-cache.status.im/', you are not a trusted user.
```
Since adding users to `trusted-users` essentially gives them `root`:

>Adding a user to trusted-users is essentially equivalent to giving that user root access to the system.
> — https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-trusted-users

A more kosher approach might be to just add the cache config itself globally.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-23 18:02:38 +02:00
Jakub Sokołowski 33b2e12e3b
android: fix Gradle deps, drop Flipper, upgrade Fresco
There are a few fixes here:

* Changes format of Gradle deps to `:buildEnvironment` and `:dependencies`:
    ```
    Cannot locate tasks that match '::buildEnvironment'. The path should not include an empty segment (try ':buildEnvironment' instead).
    ```
* Fix for GNU Parallel tool to use stdin for list of arguments:
    ```
    nix/deps/gradle/generate.sh: line 55: parallel: Argument list too long
    ```
* Update of Facebook Fresco dependencies from `2.2.0` to `2.5.0` to fix:
    ```
     > echo com.facebook.fresco:animated-gif:2.2.0 | ./go-maven-resolver > /dev/null
    finder.go:121: error: 'no pom data' for: <Dep ID=com.facebook.fresco:imagepipeline-native:2.2.0 O=false S=compile >
    finder.go:121: error: 'no pom data' for: <Dep ID=com.facebook.fresco:memory-type-native:2.2.0 O=false S=compile >
    finder.go:121: error: 'no pom data' for: <Dep ID=com.facebook.fresco:imagepipeline:2.2.0 O=false S=compile >
    finder.go:121: error: 'no pom data' for: <Dep ID=com.facebook.fresco:drawee:2.2.0 O=false S=runtime >
    finder.go:121: error: 'no pom data' for: <Dep ID=com.facebook.fresco:memory-type-java:2.2.0 O=false S=compile >
    finder.go:121: error: 'no pom data' for: <Dep ID=com.facebook.fresco:fbcore:2.2.0 O=false S=runtime >
    ```
* Remove Flipper to avoid pulling in Fresco `2.2.0` versions:
    ```
    +--- com.facebook.flipper:flipper-fresco-plugin:0.54.0
    |    +--- com.facebook.fresco:fresco:2.2.0 -> 2.5.0
    |    +--- com.facebook.fresco🐬2.2.0
    |    \--- com.facebook.fresco:stetho:2.2.0
    ```

Thanks for help from Sidarth.

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

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-23 12:02:18 +02:00
Jakub Sokołowski 7260c23e8e
nix: downgrade from 2.14.1 to 2.13.4
Should resolve errors like this:
```
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-22 14:23:47 +02:00
Jakub Sokołowski c4b13eb043
nix: use builtins to not depend on channels
We use `builtins.fetchTarball` to avoid having to first import a
`nixpkgs` from existing channels, which breaks if there are no channels.

Otherwise new Nix 2.14 version can result in:
```
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
```
Which happens due to no default `nixpkgs` channel existing:
```
 > nix-channel --list

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

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-21 15:36:08 +02:00
Mohamed Javid b397411daa
Upgrade `react-native-camera-kit` library to resolve camera issues in Sign In screen (#16248)
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-06-20 18:50:05 +05:30
Jakub Sokołowski 6f8dc27282
nix: fix applying nix.conf by using correct env var
According to this line from the docs:

>The system-wide configuration file sysconfdir/nix/nix.conf (i.e. /etc/nix/nix.conf),
>or $NIX_CONF_DIR/nix.conf if NIX_CONF_DIR is set. Values loaded in this file are not
>forwarded to the Nix daemon. The client assumes that the daemon has already loaded them.

https://nixos.org/manual/nix/stable/command-ref/conf-file.html#description

Our usage of `NIX_CONF_DIR` has been wrong for a while now.
The correct way of applying this config is using `NIX_USER_CONF_FILES`.

In addition the `extra-substituters` no longer exists in the docs.
Use of `trusted-substituters` is necessary according to:

>At least one of the following conditions must be met for Nix to use a substituter:
>
>- the substituter is in the trusted-substituters list
>- the user calling Nix is in the trusted-users list

https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-substituters

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-20 13:55:07 +02:00
Jakub Sokołowski c97559793c
nix: upgrade nixpkgs to latest nixos-22.11
Notable upgrades:

* Bash `5.1` to `5.2`
* Git `2.37.3` to `2.40.1`
* Curl `7.85.0` to `8.0.1`
* OpenSSL `3.0.5` to `3.0.8`
* Go `1.18.6` to `1.18.9`
* NodeJS `18.9.1` to `18.16.0`
* Java `1.8.0_322` to `11.0.11`
* Ruby `3.1.2` to `3.1.4`
* Python `2.7.18` to `3.10.11`
* Clojure `1.11.1.1165` to `1.11.1.1273`
* Clj-kondo `v2022.10.05` to `v2023.04.14`
* Zprint `1.2.5` to `1.2.6`
* Bundler `2.3.22` to `2.4.13`
* Gradle `6.9.2` to `6.9.4`
* Android Platform Tools `33.0.2` to `33.0.3`
* Android SDK Tools to Android SDK Command-Line Tools

Removals:

* Zprint since the version in `nixpkgs` was newer than in overlay.
* Xcode wrapper definition was removed since my fixes were merged:
  - https://github.com/NixOS/nixpkgs/pull/204278
  - https://github.com/NixOS/nixpkgs/pull/228696

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-20 12:53:06 +02:00
Jakub Sokołowski 93cf54919f
nix: add upgrade script for Nix interpreter
Now developers can upgrade to current Nix version using just:
```sh
make nix-upgrade
```
For manual instructions see:
https://nixos.org/manual/nix/stable/installation/upgrading.html

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-19 12:21:00 +02:00
Jakub Sokołowski 5f50a8c39a
nix: upgrade interpreter from 2.11.1 to 2.14.1
This is a mild upgrade that should not cause any controversy.

You can read about changes here:
- https://nixos.org/manual/nix/stable/release-notes/rl-2.12.html
- https://nixos.org/manual/nix/stable/release-notes/rl-2.13.html
- https://nixos.org/manual/nix/stable/release-notes/rl-2.14.html

Relevant `infra-ci` change:
- https://github.com/status-im/infra-ci/commit/e4e9796f

The simplest way to upgrade to `2.14` your version locally is using:
```sh
nix-channel --update
nix-env -iA nixpkgs.nixVersions.nix_2_14 nixpkgs.cacert
sudo systemctl daemon-reload
sudo systemctl restart nix-daemon
```
For MacOS the instructions are a bit different:
https://nixos.org/manual/nix/stable/installation/upgrading.html

Keep in mind you should use `nixpkgs.nixVersions.nix_2_14` instead
of just `nixpkgs.nix` to avoid getting newer than `2.14`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-19 10:58:56 +02:00
Jamie Caprani 2cbc94320d
feat: add parallax component (#16277) 2023-06-16 03:09:10 -07:00
Siddarth Kumar 350303256b
upgrade `react-native` from 0.67.5 to 0.69.10 (#16016) 2023-06-14 07:17:41 +05:30
flexsurfer fb4d484d7d
bump reagent 1.2.0 (#16070) 2023-05-31 13:35:31 +02:00
Icaro Motta 9dad4716d6
Upgrade re-frame (#15997)
This commit upgrades re-frame to v1.3.0 (latest stable release), released ~9
months ago, in 2022-08-27. This is a solid upgrade, with no breaking changes as
far as I tested status-mobile. It's a great testament of re-frame's stability
and commitment to backwards compatibility, as are many Clojure libs.

Fixes https://github.com/status-im/status-mobile/issues/15963

The big, and truly relevant addition is the introduction of the :fx built-in
effect that was added ~3 years ago in Aug/2020 in v1.1.0.

Relevant changelog:

- Global interceptors are now supported (added in v1.0.0).
- reg-event-fx will just warn (not generate an error) if the effect map returned
  contains an unknown effect key.
- re-frame will now warn us when we are calling subscribe outside of a reactive
  context.
- "re-frame now guarantees that a :db effect, if present, will be actioned
  before any other sibling effects. re-frame continues to provide NO guarantees
  about the order in which other effects will be actioned."
  (https://day8.github.io/re-frame/releases/2020/#110-2020-08-24)
- There's syntactic sugar for trivial reg-sub declarations (added in v1.3.0).
  See the documentation for reg-sub for more details
  https://day8.github.io/re-frame/api-re-frame.core/#reg-sub
- "The built-in effect :dispatch-later can now take a single map value.
  Supplying a sequence of maps is now deprecated in favor of using multiple
  :dispatch-later effects within the new :fx effect."
  https://day8.github.io/re-frame/releases/2020/#111-2020-08-26
2023-05-31 06:08:34 -03:00
Jakub Sokołowski 58d20967ae
nix: use jsbundle derivation for iOS as well
For some unknown to me reason we are using a different Yarn call to
Shadow-cljs to generate the JSBundle for iOS builds, while the one
created by the Android derivation shoudl be exactly the same.

I'm changing the target to just be `make jsbundle` while keeping aliases
referencing old naming, and moving things around in `nix` folder to
reflect the fact that the derivation is no longer Android-specific.

Also, crucially, I've changed the `import` in `index.js` to use the
`./result/index.js` path, since that's what Nix creates. I'm not sure if
this clashes with any developer workflow that takes place locally, so
I'd appreciate some testing from developers.

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

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-22 10:31:09 +02:00
Jakub Sokołowski ac3eb3e660
nix: use SRI hashes for Gradle dependencies
This way we will use the same format as Nix logs and errors when a hash
changes, which avoids confusion.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-10 15:45:32 +02:00
Ajay Sivan 1aff364595
fix: android blur view hash mismatch in some locations 2023-05-09 21:36:12 +02:00
Jakub Sokołowski b7a138118a
nix: update Gradle dependencies
Contains changes that should have been included in:
https://github.com/status-im/status-mobile/pull/15713

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-08 16:22:18 +02:00
Jakub Sokołowski f03e11c877
nix: fix handling POMs without JARs
Otherwise we can get a failure like this:
```
Regenerating Nix files...
Found 40 sub-projects...
Found 609 direct dependencies...
Found 889 dependency URLs...
 ! Failed to fetch: https://repo.maven.apache.org/maven2/org/ow2/asm/asm-bom/9.5/asm-bom-9.5.jar
```
When using `make nix-update-gradle`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-08 15:48:19 +02:00
Jakub Sokołowski 2f988fcd47
nix: disable sandboxing for xcodewrapper
Otherwise we see weird errors like this:
```
/nix/store/g0jijpgcb4q54zbvz5p8yvxcnb6lshnk-stdenv-darwin/setup: line 1391: /nix/store/sja8sqq4y5s9ijkb97i3pi2jrhsy40cz-xcode-wrapper-14.3/bin/xcodebuild: Operation not permitted
We require xcodebuild version: 14.3
error: builder for '/nix/store/d1dji0ywl851wgj9vv58ibpm32gq3wsm-xcode-wrapper-14.3.drv' failed with exit code 1;
       last 2 log lines:
       > /nix/store/g0jijpgcb4q54zbvz5p8yvxcnb6lshnk-stdenv-darwin/setup: line 1391: /nix/store/sja8sqq4y5s9ijkb97i3pi2jrhsy40cz-xcode-wrapper-14.3/bin/xcodebuild: Operation not permitted
       > We require xcodebuild version: 14.3
```
Related to: https://github.com/NixOS/nixpkgs/pull/228696

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-04-28 11:24:16 +02:00
Jakub Sokołowski 3e8647d626
nix: add ios-deploy package to ios shell
Also adds an assertion that gives a better error when trying to use an
`ios` Nix shell on an unsupported operating system.

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

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-04-20 20:17:38 +02:00
Jakub Sokołowski 40bb07a99b
ci: upgrade Xcode from 14.2 to 14.3
https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes

Related: https://github.com/status-im/infra-role-bootstrap-macos/commit/30656dc0

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-04-19 19:10:55 +02:00
Siddarth Kumar 8bf5abdf3d
patch react-native script to not look for `nvm` (#15681) 2023-04-18 22:16:12 +05:30
Jakub Sokołowski c3e52dbf47
ios: provide explicit NODE_ARGS in Nix shell
Some users have reported local `make run-ios` failures with errors like:
```
Command PhaseScriptExecution failed with a nonzero exit code
```
Where the actual error that can be found in `ios/logs/react-native-xcode.log` is:
```
node: bad option: --openssl-legacy-provider
```
Caused by a flag we apply to our pinned Node.js `18.9.1` to fix:
```
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
```
From: https://github.com/status-im/status-mobile/pull/15167

And the need for that should go away once we upgrade Node.js further.
But for now a decent fix is to not apply that flag directly in Xcode
config so as to avoid the `bad option` error when Xcode us called
outside of Nix context.

Fixes: https://github.com/status-im/status-mobile/issues/15631

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-04-13 09:36:42 +02:00
Siddarth Kumar 3bd4038089
Upgrade `react-native` from 0.63.3 to 0.67.5 (#15486)
* [IOS Only] react-native 0.63 to 0.67

* [Android Only] react-native 0.63 to 0.67

* bring back all the jenkinsfiles

* make auto-complete prop for text-input compatible

* [IOS Only] react-native 0.63 to 0.67

* [Android Only] react-native 0.63 to 0.67

* bring back all the jenkinsfiles

* nix: drop unnecessary set -x from status-go build

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* add explicity implementation line for soloader

And add deleteDebugFilesForVariant fix for libhermes.

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* use fast-image for link previews

* fix extra line in message composer on android

This elevation prop is un-necessary and causes an extra line to appear which looks like a border but its actually a shadow.

* don't use `fast-image` for url preview favicon

* fix audio record button interfering cancel android

This fix was not needed in react-native 0.63.4 but is needed after we upgraded to 0.67.5

* get rid of unused platform import

---------
Co-authored-by: Jakub Sokołowski <jakub@status.im>
2023-04-12 15:25:19 +05:30
Ibrahem Khalil a46a3e2a93
Bump go version to work with latest status-go changes (#15614) 2023-04-11 10:11:06 +02:00
Jakub Sokołowski bb73bc76a0
nix: bump nixpkgs to include fix for apksigner
Without this fix:
https://github.com/NixOS/nixpkgs/commit/d0c06fa3

The `apksigner` utility is unavailable on macOS:
```
error: Package ‘apksigner-33.0.1’ in .../pkgs/development/tools/apksigner/default.nix:86
is not supported on ‘x86_64-darwin’, refusing to evaluate.
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-04-07 18:05:50 +02:00
Alexander 5be2cd949b
Patch react-native/Yoga to make it possible to build an app using Xcode 14.3 (#15589)
* Patch react-native/Yoga to make it possible to build an app using Xcode 14.3

* Update

* Update

* Comment update

* Comment update
2023-04-06 12:20:36 +02:00
Jakub Sokołowski d71cfd12c1
nix: unpatched Node modules for Gradle deps update
Otherwise we can end up with Gradle failing to find the dependencies
because we've patched away all entries referencing external repos.

Also made the regex in AWS parser a but more strict.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-21 15:21:58 +01:00
Jakub Sokołowski c38fdec5b7
ci: upgrade Node.js from 16.17.1 to 18.9.1
The End-of-Life for Node.js 16 is set to 11th of September 2023.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-21 13:12:56 +01:00
Brian Sztamfater 74da82c61a
feat: implement new splash screen static version
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-03-16 12:57:32 -03:00
Jakub Sokołowski a0697d9242
ios: upgrade Cocoapods to 1.12.0, drop ancient fix
Upgrading to Cocoapods and Gems should remove the need for this hack-fix.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-16 10:24:27 +01:00
Jakub Sokołowski ff3249c514
nix: add procps to default shell, and tcl for darwin
Cocoapod installations can fail with errors like:
```
tclsh /Users/jenkins/Library/Caches/CocoaPods/Pods/Release/SQLCipher/3.4.2-f9fcf/tool/addopcodes.tcl parse.h.temp >parse.h
./configure: line 11729: tclsh: command not found
./configure: line 12262: tclsh: command not found
./configure: line 12276: tclsh: command not found
```
If a pure shell is used. Also `pgrep` would be missing from a pure shell.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-10 16:19:11 +01:00
Jakub Sokołowski 80a75c5232
nix: patch all Gradle configs of nodejs deps
Before we were patching only `build.gradle`, which is not the only type
of Gradle config file. If we do not cover them all we can encounter
errors about missing package because they will continue using remote
repositories instead of `mavenLocal()`, to which pass Nix store path.

We also need to cover `gradlePluginPortal()` to provide plugins.

This is also necessary for the React Native upgrade:
https://github.com/status-im/status-mobile/pull/15203

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-04 13:01:26 +01:00
Jakub Sokołowski 20a0cc01f6
nix: refactor Gradle deps to be more generic
Refactoring the derivation that fetches all the POMs, JARs,
and AARs in order to make it more generic and easier to extend.
The main change is adding `files` key in `deps.json` which contains
a dict of all the files reletad to given package.

This way we can more easily include other files that might be available
for download, like AARs with ASC suffix, or `nodeps` JARs.

This is also necessary for the React Native upgrade:
https://github.com/status-im/status-mobile/pull/15203

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-04 12:41:29 +01:00
Jakub Sokołowski 4fe8b81bf6
ios: fix xcode using system Node.js version
As discovered in:
https://github.com/status-im/status-mobile/pull/15225

The attempt to fix this in:
https://github.com/status-im/status-mobile/pull/15180

But it doesn't appear to work, so instead I'm allowing an override of
`NODE_BINARY` variable and spetting it when defining the Nix shell.

The key things here are:

* Xcode injects its own paths into `PATH` which breaks Nix env.
* Combining Nix shells with `inputsFrom` does not inherit all vars.

It's important to set these variables in `shellHook` and not elsewhere.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-02 17:32:52 +01:00
Jakub Sokołowski b72f0d4702
nix: fix Gradle nodeps JAR symlink filename
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-02-28 17:57:39 +01:00
Jakub Sokołowski 51276237f2
nix: include nodeps JARs in Gradle deps (#15212)
* nix: update gradle dependencies

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* nix: include nodeps JARs in Gradle deps

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* nix: include nodeps JAR for semver4j 0.16.4

Can cause failures like in some cases:
```
A problem occurred configuring project ':react-native-hole-view'.
> Could not resolve all files for configuration ':react-native-hole-view:classpath'.
   > Could not find semver4j-0.16.4-nodeps.jar (com.github.gundy:semver4j:0.16.4).
     Searched in the following locations:
         file:/nix/store/3n2pxsqa2izlx8c23s6jgqai0bqaklm1-status-mobile-maven-deps/com/github/gundy/semver4j/0.16.4/semver4j-0.16.4-nodeps.jar
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>

---------

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-02-28 17:13:44 +05:30
Michele Balistreri 6a58f9552d
update keycard native module
Signed-off-by: Michele Balistreri <michele@bitgamma.com>
2023-02-23 11:11:20 +01:00
Jakub Sokołowski e2169cbbd4
ios: use --openssl-legacy-provider with iOS builds
Fixes issue with following failure:
```
Failed to construct transformer:  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:130:10)
    at stableHash (/Users/jenkins/workspace/status-mobile/platforms/ios/node_modules/metro-cache/src/stableHash.js:19:8)
    at JsTransformer.getCacheKey (/Users/jenkins/workspace/status-mobile/platforms/ios/node_modules/metro/src/JSTransformer/worker.js:471:7)
    at getTransformCacheKey (/Users/jenkins/workspace/status-mobile/platforms/ios/node_modules/metro/src/DeltaBundler/Transformer/getTransformCacheKey.js:39:29)
    at new Transformer (/Users/jenkins/workspace/status-mobile/platforms/ios/node_modules/metro/src/DeltaBundler/Transformer.js:147:28)
    at /Users/jenkins/workspace/status-mobile/platforms/ios/node_modules/metro/src/Bundler.js:54:29
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
```
https://roytuts.com/how-to-fix-err_ossl_evp_unsupported-in-react-js-application/

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-02-22 18:48:03 +01:00
Jakub Sokołowski 0f8ad69319
Nix/upgrade zprint 1.2.5 (#15113)
* nix: upgrade zprint from 1.2.4 to 1.2.5

To address issue described in:
https://github.com/kkinnear/zprint/issues/273

Signed-off-by: Jakub Sokołowski <jakub@status.im>

* chore: use zprint :multi-lhs-hang

* refactor: re-format clojure using zprint 1.2.5

---------

Signed-off-by: Jakub Sokołowski <jakub@status.im>
Co-authored-by: yqrashawn <namy.19@gmail.com>
2023-02-17 20:10:00 +08:00
Parvesh Monu 612c17a8db
Add blur overlay for bottom tabs and shell top nav (#14783) 2023-01-25 20:08:11 +05:30
Alexander 27c8c5547c
[#14689] Link previews in chat (#14771)
* Initial

* Link fetching

* Post-merge fix
2023-01-18 22:43:26 +01:00
yqrashawn 9ded8bfe97
chore: tweak zprint conf (#14645) 2022-12-28 10:05:24 +08:00
yqrashawn 39e29cfb5a
feat: replace clj-fmt with zprint (#14520) 2022-12-20 21:57:49 +08:00