Commit Graph

12 Commits

Author SHA1 Message Date
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 718e6cdbb3
ci: disable sandbox for status-go iOS builds
Otherwise we get weird failures like these:
```
clang-11: error: cannot use 'cpp-output' output with multiple -arch options
clang-11: error: invalid argument '-mmacos-version-min=10.12' not allowed with '-miphoneos-version-min=8.0'
clang-11: error: invalid argument '-mmacos-version-min=10.12' not allowed with '-miphoneos-version-min=8.0'
```
Depends on: https://github.com/status-im/status-jenkins-lib/pull/47

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-09-01 16:17:47 +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 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 466d279e2a
nix: Increase stalled-download-timeout to 1 hour
Might help with issues described in: https://github.com/status-im/infra-ci/issues/17.

Details: https://github.com/NixOS/nixpkgs/issues/65015#issuecomment-662675716

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-22 12:43:01 +02:00
Jakub Sokołowski 0be5f5d8d0
nix: enable build-use-sandbox for Android
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-29 10:12:30 +02:00
Jakub Sokołowski de7ce0493b
nix: optimize garbage collection
In order to prevent `nix-store --gc` from removing too much I've:

- Added the `keep-outputs = true` setting to `nix/nix.conf`
- Fixed `nix/scripts/gcroots.sh` to make symlinks in `/nix/var/nix/gcroots`
- Made `nix/scripts/build.sh` and `nix/scripts/shell.sh` use it

This way when running `make nix-gc` most recently used shells and built
derivations won't be removed along with their dependencies.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-22 16:34:27 +02:00
Jakub Sokołowski fd33094387
nix: bump stalled-download-timeout to 10 minutes
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-01-16 13:31:58 +01:00
Jakub Sokołowski b32dd113f6
nix: upgrade nixpkgs
Also:
- upgrade Go: 1.12 > 1.13
- upgrade Android SDK: 28.0.3 > 29.0.2
- nix: stop using system Fastlane for iOS builds
- nix: include CocoaPods in shell for iOS
- nix: concatenate shellHooks correctly
- fix gomobile status-go build by setting GO111MODULE=off
- fix gradle accepting empty STATUS_GO_SRC_OVERRIDE value
- don't use a pure shell for uploadToSauceLabs()

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-26 16:30:41 +01:00
Jakub Sokołowski b9ab37019d
build status-go for Nix cache
Also fix scripts/update-status-go.sh to accept commit SHA1

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-07-23 01:01:41 -04:00
Jakub Sokołowski aa3c0fb585
add alternative nix-cache in China
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-05-13 19:37:19 +02:00
Pedro Pombeiro 65e6e80349
Create Nix package for building status-go 2019-04-09 12:44:39 +02:00