2020-04-26 12:40:06 +00:00
|
|
|
{ callPackage, lib, mkShell,
|
2019-11-29 10:20:08 +00:00
|
|
|
xcodeWrapper, projectNodePackage, status-go,
|
|
|
|
flock, procps, watchman, bundler, fastlane }:
|
2019-06-04 16:50:29 +00:00
|
|
|
|
|
|
|
let
|
2019-11-29 10:20:08 +00:00
|
|
|
inherit (lib) catAttrs unique;
|
2019-06-04 16:50:29 +00:00
|
|
|
|
2020-04-26 12:40:06 +00:00
|
|
|
pod-shell = callPackage ./pod-shell.nix { };
|
2019-11-29 10:20:08 +00:00
|
|
|
status-go-shell = callPackage ./status-go-shell.nix { inherit status-go; };
|
|
|
|
|
|
|
|
selectedSources = [ status-go fastlane ];
|
2019-06-04 16:50:29 +00:00
|
|
|
|
2019-09-13 13:45:24 +00:00
|
|
|
buildInputs = unique ([
|
2019-11-29 10:20:08 +00:00
|
|
|
xcodeWrapper watchman bundler procps
|
2019-09-13 13:45:24 +00:00
|
|
|
flock # used in reset-node_modules.sh
|
|
|
|
] ++ catAttrs "buildInputs" selectedSources);
|
2019-12-04 13:14:55 +00:00
|
|
|
|
2019-11-29 10:20:08 +00:00
|
|
|
localShell = mkShell {
|
2020-04-26 12:40:06 +00: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
|
|
|
|
'';
|
|
|
|
inherit buildInputs;
|
2019-12-04 13:14:55 +00:00
|
|
|
};
|
2019-11-29 10:20:08 +00:00
|
|
|
|
|
|
|
in {
|
2020-04-23 18:19:12 +00:00
|
|
|
inherit buildInputs pod-shell status-go-shell;
|
2019-11-29 10:20:08 +00:00
|
|
|
|
2020-04-26 12:40:06 +00:00
|
|
|
shell = lib.mergeSh localShell [
|
|
|
|
fastlane.shell status-go-shell pod-shell
|
2019-11-29 10:20:08 +00:00
|
|
|
];
|
2019-06-04 16:50:29 +00:00
|
|
|
}
|