nix: port iOS changes and fixes from develop

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-02-23 15:55:01 +01:00
parent 36acc6e9f4
commit 30dc506441
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
5 changed files with 32 additions and 13 deletions

View File

@ -1,32 +1,31 @@
{ callPackage, lib, mkShell, deps, pkgs
{ callPackage, lib, mkShell, pkgs
, status-go, fastlane }:
let
inherit (lib) catAttrs unique;
pod-shell = callPackage ./pod-shell.nix { };
status-go-shell = callPackage ./status-go-shell.nix { inherit status-go; };
# Sub-shells preparing various dependencies.
nodejs-sh = callPackage ./shells/nodejs.nix { };
bundler-sh = callPackage ./shells/bundler.nix { };
cocoapods-sh = callPackage ./shells/cocoapods.nix { };
status-go-sh = callPackage ./shells/status-go.nix { inherit status-go; };
in {
inherit pod-shell status-go-shell;
inherit nodejs-sh cocoapods-sh status-go-sh;
shell = mkShell {
buildInputs = with pkgs; [
xcodeWrapper watchman bundler procps
xcodeWrapper watchman procps
flock # used in nix/scripts/node_modules.sh
];
# WARNING: Executes shellHook in reverse order.
inputsFrom = [
fastlane.shell
pod-shell
status-go-shell # Needs to run before pod-install
cocoapods-sh
nodejs-sh # before 'pod install'
bundler-sh # before 'pod install'
status-go-sh # before 'pod install'
];
shellHook = ''
# check if node modules changed and if so install them
./nix/scripts/node_modules.sh "${deps.nodejs-patched}"
'';
};
}

View File

@ -0,0 +1,8 @@
{ mkShell, bundler }:
mkShell {
buildInputs = [ bundler ];
shellHook = ''
bundle install --quiet --gemfile=fastlane/Gemfile
'';
}

View File

@ -0,0 +1,12 @@
{ mkShell, deps }:
mkShell {
# Fix for ERR_OSSL_EVP_UNSUPPORTED error.
NODE_OPTIONS = "--openssl-legacy-provider";
# check if node modules changed and if so install them
shellHook = ''
export STATUS_MOBILE_HOME=$(git rev-parse --show-toplevel)
"$STATUS_MOBILE_HOME/nix/scripts/node_modules.sh" ${deps.nodejs-patched}
'';
}