2020-04-26 14:40:06 +02:00
|
|
|
{ callPackage, lib, mkShell,
|
2019-11-29 11:20:08 +01:00
|
|
|
xcodeWrapper, projectNodePackage, status-go,
|
|
|
|
flock, procps, watchman, bundler, fastlane }:
|
2019-06-04 18:50:29 +02:00
|
|
|
|
|
|
|
let
|
2019-11-29 11:20:08 +01:00
|
|
|
inherit (lib) catAttrs unique;
|
2019-06-04 18:50:29 +02:00
|
|
|
|
2020-04-26 14:40:06 +02:00
|
|
|
pod-shell = callPackage ./pod-shell.nix { };
|
2019-11-29 11:20:08 +01:00
|
|
|
status-go-shell = callPackage ./status-go-shell.nix { inherit status-go; };
|
|
|
|
|
2020-05-06 00:48:50 +02:00
|
|
|
in {
|
|
|
|
inherit pod-shell status-go-shell;
|
|
|
|
|
|
|
|
shell = mkShell {
|
|
|
|
buildInputs = [
|
|
|
|
xcodeWrapper watchman bundler procps
|
|
|
|
flock # used in reset-node_modules.sh
|
|
|
|
];
|
2019-06-04 18:50:29 +02:00
|
|
|
|
2020-05-06 00:48:50 +02:00
|
|
|
inputsFrom = [
|
|
|
|
fastlane.shell
|
|
|
|
status-go-shell
|
|
|
|
pod-shell
|
|
|
|
];
|
2019-12-04 14:14:55 +01:00
|
|
|
|
2020-04-26 14:40:06 +02:00
|
|
|
shellHook = ''
|
|
|
|
pushd "$STATUS_REACT_HOME" > /dev/null
|
|
|
|
{
|
|
|
|
# Set up symlinks to mobile enviroment in project root
|
|
|
|
ln -sf ./mobile/js_files/metro.config.js ./metro.config.js
|
|
|
|
ln -sf ./mobile/js_files/package.json ./package.json
|
|
|
|
ln -sf ./mobile/js_files/yarn.lock ./yarn.lock
|
|
|
|
|
|
|
|
# check if node modules changed and if so install them
|
|
|
|
./nix/mobile/reset-node_modules.sh "${projectNodePackage}"
|
|
|
|
}
|
|
|
|
popd > /dev/null
|
|
|
|
'';
|
2019-12-04 14:14:55 +01:00
|
|
|
};
|
2019-11-29 11:20:08 +01:00
|
|
|
|
2019-06-04 18:50:29 +02:00
|
|
|
}
|