From 6a23f645507016e5d8c1e7ca01ea1c4ef4c86d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 10 Oct 2022 20:01:17 +0200 Subject: [PATCH] nix: re-add step to call bundler install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was removed in: https://github.com/status-im/status-jenkins-lib/pull/48 But only causes issues when version of Ruby Gems change. Signed-off-by: Jakub SokoĊ‚owski --- nix/mobile/ios/default.nix | 9 ++++++--- nix/mobile/ios/shells/bundler.nix | 8 ++++++++ nix/mobile/ios/shells/pod.nix | 24 ------------------------ 3 files changed, 14 insertions(+), 27 deletions(-) create mode 100644 nix/mobile/ios/shells/bundler.nix delete mode 100644 nix/mobile/ios/shells/pod.nix diff --git a/nix/mobile/ios/default.nix b/nix/mobile/ios/default.nix index 82aaf844cd..835647d41f 100644 --- a/nix/mobile/ios/default.nix +++ b/nix/mobile/ios/default.nix @@ -4,8 +4,10 @@ let inherit (lib) catAttrs unique; + # Sub-shells preparing various dependencies. nodejs-sh = callPackage ./shells/nodejs.nix { }; - cocoapods-sh = callPackage ./shells/pod.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 { @@ -13,7 +15,7 @@ in { shell = mkShell { buildInputs = with pkgs; [ - xcodeWrapper watchman bundler procps + xcodeWrapper watchman procps flock # used in nix/scripts/node_modules.sh ]; @@ -21,7 +23,8 @@ in { inputsFrom = [ fastlane.shell cocoapods-sh - nodejs-sh # before 'pod install' + nodejs-sh # before 'pod install' + bundler-sh # before 'pod install' status-go-sh # before 'pod install' ]; }; diff --git a/nix/mobile/ios/shells/bundler.nix b/nix/mobile/ios/shells/bundler.nix new file mode 100644 index 0000000000..506054ef09 --- /dev/null +++ b/nix/mobile/ios/shells/bundler.nix @@ -0,0 +1,8 @@ +{ mkShell, bundler }: + +mkShell { + buildInputs = [ bundler ]; + shellHook = '' + bundle install --quiet --gemfile=fastlane/Gemfile + ''; +} diff --git a/nix/mobile/ios/shells/pod.nix b/nix/mobile/ios/shells/pod.nix deleted file mode 100644 index 8742f8d41e..0000000000 --- a/nix/mobile/ios/shells/pod.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ mkShell, cocoapods }: - -let - # source of what pod should install - podfileLock = "ios/Podfile.lock"; - # current state of pods installed by pod - manifestLock = "ios/Pods/Manifest.lock"; -in mkShell { - buildInputs = [ cocoapods ]; - shellHook = '' - pushd "$STATUS_MOBILE_HOME" > /dev/null - { - echo "Checking for modifications in ios/Pods..." - if diff -q ${podfileLock} ${manifestLock}; then - echo "No modifications detected." - else - # CocoaPods are trash and can't handle other pod instances running - ./scripts/wait-for.sh 240 'pod install' - (cd ios && pod install) - fi - } - popd > /dev/null - ''; -}