Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xcodeenv: use __noChroot to avoid permission errors #228696

Merged
merged 1 commit into from
May 3, 2023

Conversation

jakubgs
Copy link
Contributor

@jakubgs jakubgs commented Apr 28, 2023

Description of changes

When sandbox=relaxed is used this derivation fails with: xcodebuild: Operation not permitted

> /nix/store/yyy-stdenv-darwin/setup: line 1391: /nix/store/xxx-xcode-wrapper-14.3/bin/xcodebuild: Operation not permitted
> We require xcodebuild version: 14.3
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

jakubgs added a commit to status-im/status-mobile that referenced this pull request Apr 28, 2023
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: NixOS/nixpkgs#228696

Signed-off-by: Jakub Sokołowski <jakub@status.im>
@SuperSandro2000 SuperSandro2000 requested a review from a team April 28, 2023 13:06
Copy link
Contributor

@uri-canva uri-canva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check was added in 5b0ca88 but I don't entirely understand it. Shouldn't it be a runtime check? Whether the version is the correct one or not depends on the runtime environment, not the build time environment, as the derivation's output is symlinks to the default installation directories, not hardlinks to specific files at build time.

@svanderburg is the check at build time intentional?

@uri-canva
Copy link
Contributor

Looking at the comments in #204278 it could be that @svanderburg is inactive. In that case @jakubgs are you happy to make the change to make the check happen at runtime? Do you think it makes sense?

@jakubgs
Copy link
Contributor Author

jakubgs commented Apr 29, 2023

That's not what this change is about.

@uri-canva
Copy link
Contributor

Doesn't the error:

/nix/store/xxx-xcode-wrapper-14.3/bin/xcodebuild: Operation not permitted

happen because that xcodebuild is a symlink to a location outside the sandbox? So it's a valid error, the derivation isn't pure as it is now.

@jakubgs
Copy link
Contributor Author

jakubgs commented May 3, 2023

It never was pure. I'm not trying to fix it being impure, I'm trying to avoid a confusing error.

You are free to figure out a way to make this actually pure - which is impossible as far as I can tell - as you cannot even trust the same exact build of xcode to behave the same way on different hosts from my personal experience of doing ios/macos application builds for the last 5 years. So yeah, you are free to make your own PR to try to square that circle. I'm just trying to avoid a confusing error when sandbox: relaxed is set.

When `sandbox=relaxed` is used this derivation fails with:
```
> /nix/store/yyy-stdenv-darwin/setup: line 1391: /nix/store/xxx-xcode-wrapper-14.3/bin/xcodebuild: Operation not permitted
> We require xcodebuild version: 14.3
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
@wegank wegank merged commit d0f032c into NixOS:master May 3, 2023
16 checks passed
@jakubgs jakubgs deleted the xcodeenv/use-no-chroot branch May 3, 2023 10:34
jakubgs added a commit to status-im/status-go that referenced this pull request May 4, 2023
Fixes:
- NixOS/nixpkgs#204278
- NixOS/nixpkgs#228696

Other notable upgrades:

- Bash from `5.1` to `5.2`
- Binutils from `2.39` to `2.40`
- GnuAWK from `5.1.1` to `5.2.1`
- GCC  from `11.3.0` to `12.2.0`
- GNU Make from `4.3` to `4.4.1`
- Git from `4.8` to `4.9`
- Go from `1.19.2` to `1.19.8`
- Android SDK tools from `33.0.2` to `33.0.3`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
jakubgs added a commit to waku-org/go-waku that referenced this pull request May 4, 2023
Fixes:
- NixOS/nixpkgs#204278
- NixOS/nixpkgs#228696

Other notable upgrades:

- Bash from `5.1` to `5.2`
- Binutils from `2.39` to `2.40`
- GnuAWK from `5.1.1` to `5.2.1`
- GCC  from `11.3.0` to `12.2.0`
- GNU Make from `4.3` to `4.4.1`
- Go from `1.19.6` to `1.19.8`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
jakubgs added a commit to waku-org/go-waku that referenced this pull request May 4, 2023
Fixes:
- NixOS/nixpkgs#204278
- NixOS/nixpkgs#228696

Other notable upgrades:

- Bash from `5.1` to `5.2`
- Binutils from `2.39` to `2.40`
- GnuAWK from `5.1.1` to `5.2.1`
- GCC  from `11.3.0` to `12.2.0`
- GNU Make from `4.3` to `4.4.1`
- Go from `1.19.6` to `1.19.8`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
jakubgs added a commit to status-im/status-go that referenced this pull request May 4, 2023
Fixes:
- NixOS/nixpkgs#204278
- NixOS/nixpkgs#228696

Other notable upgrades:

- Bash from `5.1` to `5.2`
- Binutils from `2.39` to `2.40`
- GnuAWK from `5.1.1` to `5.2.1`
- GCC  from `11.3.0` to `12.2.0`
- GNU Make from `4.3` to `4.4.1`
- Git from `4.8` to `4.9`
- Go from `1.19.2` to `1.19.8`
- Android SDK tools from `33.0.2` to `33.0.3`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
jakubgs added a commit to waku-org/go-waku that referenced this pull request May 4, 2023
Fixes:
- NixOS/nixpkgs#204278
- NixOS/nixpkgs#228696

Other notable upgrades:

- Bash from `5.1` to `5.2`
- Binutils from `2.39` to `2.40`
- GnuAWK from `5.1.1` to `5.2.1`
- GCC  from `11.3.0` to `12.2.0`
- GNU Make from `4.3` to `4.4.1`
- Go from `1.19.6` to `1.19.8`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
jakubgs added a commit to waku-org/go-waku that referenced this pull request May 4, 2023
Fixes:
- NixOS/nixpkgs#204278
- NixOS/nixpkgs#228696

Other notable upgrades:

- Bash from `5.1` to `5.2`
- Binutils from `2.39` to `2.40`
- GnuAWK from `5.1.1` to `5.2.1`
- GCC  from `11.3.0` to `12.2.0`
- GNU Make from `4.3` to `4.4.1`
- Go from `1.19.6` to `1.19.8`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
jakubgs added a commit to status-im/status-mobile that referenced this pull request Jun 5, 2023
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`
* 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`
* Zprint `1.2.5` to `1.2.6`
* Gradle `6.9.2` to `6.9.4`
* Bundler `2.3.22` to `2.3.26`

Removals:

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

Signed-off-by: Jakub Sokołowski <jakub@status.im>
jakubgs added a commit to status-im/status-mobile that referenced this pull request Jun 5, 2023
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.18`
* 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`

Removals:

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

Signed-off-by: Jakub Sokołowski <jakub@status.im>
yakimant pushed a commit to status-im/status-mobile that referenced this pull request Jun 15, 2023
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.18`
* 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`

Removals:

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

Signed-off-by: Jakub Sokołowski <jakub@status.im>
yakimant pushed a commit to status-im/status-mobile that referenced this pull request Jun 16, 2023
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:
  - NixOS/nixpkgs#204278
  - NixOS/nixpkgs#228696

Signed-off-by: Jakub Sokołowski <jakub@status.im>
jakubgs added a commit to status-im/status-mobile that referenced this pull request Jun 20, 2023
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:
  - NixOS/nixpkgs#204278
  - NixOS/nixpkgs#228696

Signed-off-by: Jakub Sokołowski <jakub@status.im>
jakubgs added a commit to status-im/status-mobile that referenced this pull request Jun 20, 2023
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:
  - NixOS/nixpkgs#204278
  - NixOS/nixpkgs#228696

Signed-off-by: Jakub Sokołowski <jakub@status.im>
codemaster115 pushed a commit to status-im/status-mobile that referenced this pull request Jun 20, 2023
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:
  - NixOS/nixpkgs#204278
  - NixOS/nixpkgs#228696

Signed-off-by: Jakub Sokołowski <jakub@status.im>
codemaster115 added a commit to status-im/status-mobile that referenced this pull request Jun 21, 2023
* fix: remove placeholder icons

* fix: swipe action button style

* lint fix

* fix: swipe action button space

* fix: lint

* Fix for two separate sections with different colors shown on the chat screen (dark mode)  (#16265)

* Fix for two separate sections with different colors shown on the chat screen (dark mode)

* lint-fix

* temporary hide mutual update's messages (#16290)

* chore: fix unit test for slide button (#16302)

* 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>

* 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>

* fix switcher cards position in ios (#16301)

* Fix community tags and button spacing (#16292)

Linked to #16119, fixes
these issues:

- Clipped community tags. They should extend to the edge of the screen.
- Outdated information box message. Updated according suggestion in Figma
  https://www.figma.com/file/h9wo4GipgZURbqqr1vShFN/Communities-for-Mobile?type=design&node-id=7035-462899&t=wED97E4Mtv9v6OXf-0
- Add correct padding between community tags and the Request to join Community
  button.

* Add decision about team structure & wallet team

* [#16118] bottom nav tab notification color (#16236)

* [#16066] bottom sheet height (#16285)

* Update prettier config for the project. (#16303)

* Update prettier config for the project.

* Add prettier to make lint-fix.

* fix: placeholder icons for join community, identity verification request

* fix: lint

* Make profile photos visible by default (#16095)

* Fix incorrect channel option (#16314)

* e2e: tests fixes

* tests: fix type of shell used for linting

Otherwise Node modules are not installed.

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

* 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:
  - NixOS/nixpkgs#204278
  - NixOS/nixpkgs#228696

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

* ci: build generic status-go and all shells

When discussing caching of `status-go` with Sid I noticed that the build
we cache daily created from our nightly build is different from the
build we create locally due to a single input.

In a release CI host we can see the IPFS URL is that of Infura:
```
 > find /nix/store -maxdepth 1 -name '*-status-go-*android' | tail -n1
/nix/store/2cc8ilhx5g3k2awbn4sla61n4cml2405-status-go-0.130.1-d2cce5e-android

 > RESULT=$(find /nix/store -maxdepth 1 -name '*-status-go-*android' | tail -n1)

 > nix show-derivation $RESULT | tr ' ' '\n' | grep IpfsGateway
github.com/status-im/status-go/params.IpfsGatewayURL=https://status-im.infura-ipfs.io/ipfs/
```
But for a local build the URL is the default, which is our own gateway:
```
 > nix-build --no-out-link -A targets.status-go.mobile.android
/nix/store/1p53m7a6y1kg3vcyd8d06scf3bsyn5rk-status-go-0.157.2-47711c4-android

 > RESULT=$(nix-build --no-out-link -A targets.status-go.mobile.android)

 > nix show-derivation $RESULT | tr ' ' '\n' | grep IpfsGateway
github.com/status-im/status-go/params.IpfsGatewayURL=https://ipfs.status.im/
```
This difference causes builds of `status-go` that get uploaded to our
Nix cache to not match what developers locally would build, which
results in a cache miss.

This changes the Nix cache CI jobs to instead of building only dependencies
(`buildInuts`) to simply build the generic versions of `status-go` without
nightly specific inputs.

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

* 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>

* 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>

* Update prettier script. (#16324)

* Update prettier script.

* Add target and component-spec to prettierignore.

---------

Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Co-authored-by: Alexander <alwxndr@gmail.com>
Co-authored-by: flexsurfer <flexsurfer@users.noreply.github.com>
Co-authored-by: Jamie Caprani <jamiecaprani@gmail.com>
Co-authored-by: Jakub Sokołowski <jakub@status.im>
Co-authored-by: Parvesh Monu <parvesh.dhullmonu@gmail.com>
Co-authored-by: Icaro Motta <icaro.ldm@gmail.com>
Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
Co-authored-by: Ulises Manuel Cárdenas <90291778+ulisesmac@users.noreply.github.com>
Co-authored-by: Rahul Pratap <rahulpsingh@users.noreply.github.com>
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
Co-authored-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
codemaster115 pushed a commit to status-im/status-mobile that referenced this pull request Jul 7, 2023
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:
  - NixOS/nixpkgs#204278
  - NixOS/nixpkgs#228696

Signed-off-by: Jakub Sokołowski <jakub@status.im>
codemaster115 added a commit to status-im/status-mobile that referenced this pull request Jul 7, 2023
* fix: remove placeholder icons

* fix: swipe action button style

* lint fix

* fix: swipe action button space

* fix: lint

* Fix for two separate sections with different colors shown on the chat screen (dark mode)  (#16265)

* Fix for two separate sections with different colors shown on the chat screen (dark mode)

* lint-fix

* temporary hide mutual update's messages (#16290)

* chore: fix unit test for slide button (#16302)

* 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>

* 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>

* fix switcher cards position in ios (#16301)

* Fix community tags and button spacing (#16292)

Linked to #16119, fixes
these issues:

- Clipped community tags. They should extend to the edge of the screen.
- Outdated information box message. Updated according suggestion in Figma
  https://www.figma.com/file/h9wo4GipgZURbqqr1vShFN/Communities-for-Mobile?type=design&node-id=7035-462899&t=wED97E4Mtv9v6OXf-0
- Add correct padding between community tags and the Request to join Community
  button.

* Add decision about team structure & wallet team

* [#16118] bottom nav tab notification color (#16236)

* [#16066] bottom sheet height (#16285)

* Update prettier config for the project. (#16303)

* Update prettier config for the project.

* Add prettier to make lint-fix.

* fix: placeholder icons for join community, identity verification request

* fix: lint

* Make profile photos visible by default (#16095)

* Fix incorrect channel option (#16314)

* e2e: tests fixes

* tests: fix type of shell used for linting

Otherwise Node modules are not installed.

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

* 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:
  - NixOS/nixpkgs#204278
  - NixOS/nixpkgs#228696

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

* ci: build generic status-go and all shells

When discussing caching of `status-go` with Sid I noticed that the build
we cache daily created from our nightly build is different from the
build we create locally due to a single input.

In a release CI host we can see the IPFS URL is that of Infura:
```
 > find /nix/store -maxdepth 1 -name '*-status-go-*android' | tail -n1
/nix/store/2cc8ilhx5g3k2awbn4sla61n4cml2405-status-go-0.130.1-d2cce5e-android

 > RESULT=$(find /nix/store -maxdepth 1 -name '*-status-go-*android' | tail -n1)

 > nix show-derivation $RESULT | tr ' ' '\n' | grep IpfsGateway
github.com/status-im/status-go/params.IpfsGatewayURL=https://status-im.infura-ipfs.io/ipfs/
```
But for a local build the URL is the default, which is our own gateway:
```
 > nix-build --no-out-link -A targets.status-go.mobile.android
/nix/store/1p53m7a6y1kg3vcyd8d06scf3bsyn5rk-status-go-0.157.2-47711c4-android

 > RESULT=$(nix-build --no-out-link -A targets.status-go.mobile.android)

 > nix show-derivation $RESULT | tr ' ' '\n' | grep IpfsGateway
github.com/status-im/status-go/params.IpfsGatewayURL=https://ipfs.status.im/
```
This difference causes builds of `status-go` that get uploaded to our
Nix cache to not match what developers locally would build, which
results in a cache miss.

This changes the Nix cache CI jobs to instead of building only dependencies
(`buildInuts`) to simply build the generic versions of `status-go` without
nightly specific inputs.

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

* 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>

* 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>

* Update prettier script. (#16324)

* Update prettier script.

* Add target and component-spec to prettierignore.

---------

Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Co-authored-by: Alexander <alwxndr@gmail.com>
Co-authored-by: flexsurfer <flexsurfer@users.noreply.github.com>
Co-authored-by: Jamie Caprani <jamiecaprani@gmail.com>
Co-authored-by: Jakub Sokołowski <jakub@status.im>
Co-authored-by: Parvesh Monu <parvesh.dhullmonu@gmail.com>
Co-authored-by: Icaro Motta <icaro.ldm@gmail.com>
Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
Co-authored-by: Ulises Manuel Cárdenas <90291778+ulisesmac@users.noreply.github.com>
Co-authored-by: Rahul Pratap <rahulpsingh@users.noreply.github.com>
Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
Co-authored-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants