mirror of
https://github.com/status-im/status-react.git
synced 2025-01-10 02:56:07 +00:00
90fbcfab2b
This sidesteps an issue where Nix complains about mismatched hashes in `ruby2.5.3-unf_ext-0.0.7.6` expression for Android CI builds. Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
32 lines
1014 B
Nix
32 lines
1014 B
Nix
{ stdenv, target-os, callPackage, mkShell, makeWrapper,
|
|
bundlerEnv, bundler, ruby, curl }:
|
|
|
|
let
|
|
inherit (stdenv.lib) optionals optionalString unique;
|
|
|
|
platform = callPackage ../../platform.nix { inherit target-os; };
|
|
useFastlanePkg = platform.targetAndroid && !stdenv.isDarwin;
|
|
fastlane = callPackage ../../../fastlane {
|
|
bundlerEnv = _: bundlerEnv {
|
|
name = "fastlane-gems";
|
|
gemdir = ../../../fastlane;
|
|
};
|
|
};
|
|
bundlerDeps = optionals platform.targetMobile [ bundler ruby ];
|
|
shellHook = optionalString useFastlanePkg fastlane.shellHook;
|
|
|
|
# TARGETS
|
|
shell = mkShell {
|
|
buildInputs = if useFastlanePkg then [ fastlane curl ] else bundlerDeps; # bundler/ruby used for fastlane on macOS
|
|
inherit shellHook;
|
|
};
|
|
|
|
in {
|
|
# We only include bundler in regular shell if targetting iOS, because that's how the CI builds the whole project
|
|
buildInputs = unique (optionals (!useFastlanePkg && platform.targetIOS) bundlerDeps);
|
|
inherit shellHook;
|
|
|
|
# TARGETS
|
|
inherit shell;
|
|
}
|