2019-06-04 16:50:29 +00:00
|
|
|
{ stdenv, target-os, callPackage, mkShell, makeWrapper,
|
|
|
|
bundlerEnv, bundler, ruby, curl }:
|
|
|
|
|
|
|
|
let
|
2019-07-15 10:17:21 +00:00
|
|
|
inherit (stdenv.lib) optionals optionalString unique;
|
|
|
|
|
2019-06-04 16:50:29 +00:00
|
|
|
platform = callPackage ../../platform.nix { inherit target-os; };
|
|
|
|
fastlane = callPackage ../../../fastlane {
|
2019-07-29 08:33:35 +00:00
|
|
|
bundlerEnv = _:
|
|
|
|
bundlerEnv {
|
|
|
|
name = "fastlane-gems";
|
|
|
|
gemdir = ../../../fastlane;
|
|
|
|
};
|
2019-06-04 16:50:29 +00:00
|
|
|
};
|
2019-07-29 08:33:35 +00:00
|
|
|
bundlerDeps = optionals platform.targetMobile [
|
|
|
|
bundler
|
|
|
|
ruby
|
|
|
|
]; # bundler/ruby used for fastlane on macOS
|
2019-11-20 12:42:41 +00:00
|
|
|
inherit (fastlane) shellHook;
|
2019-06-04 16:50:29 +00:00
|
|
|
|
|
|
|
# TARGETS
|
|
|
|
shell = mkShell {
|
2019-11-20 12:42:41 +00:00
|
|
|
buildInputs = [ fastlane curl ] ++ bundlerDeps;
|
2019-07-15 10:17:21 +00:00
|
|
|
inherit shellHook;
|
2019-06-04 16:50:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
2019-11-20 12:42:41 +00:00
|
|
|
# We only include bundler in regular shell if targetting iOS, because that's how the CI builds the whole project
|
|
|
|
buildInputs = unique (optionals platform.targetIOS bundlerDeps);
|
2019-07-15 10:17:21 +00:00
|
|
|
inherit shellHook;
|
2019-06-04 16:50:29 +00:00
|
|
|
|
|
|
|
# TARGETS
|
|
|
|
inherit shell;
|
|
|
|
}
|