Skip to content

Commit

Permalink
nix: port iOS changes and fixes from develop
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed Feb 23, 2023
1 parent 36acc6e commit 30dc506
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 13 deletions.
25 changes: 12 additions & 13 deletions nix/mobile/ios/default.nix
Original file line number Diff line number Diff line change
@@ -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}"
'';
};

}
8 changes: 8 additions & 0 deletions nix/mobile/ios/shells/bundler.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{ mkShell, bundler }:

mkShell {
buildInputs = [ bundler ];
shellHook = ''
bundle install --quiet --gemfile=fastlane/Gemfile
'';
}
File renamed without changes.
12 changes: 12 additions & 0 deletions nix/mobile/ios/shells/nodejs.nix
Original file line number Diff line number Diff line change
@@ -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}
'';
}
File renamed without changes.

0 comments on commit 30dc506

Please sign in to comment.