nix: re-add step to call bundler install

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 <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-10-10 20:01:17 +02:00
parent 4bbacf542c
commit 6a23f64550
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
3 changed files with 14 additions and 27 deletions

View File

@ -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'
];
};

View File

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

View File

@ -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
'';
}