2019-04-03 11:06:42 +00:00
{ pkgs ? import <nixpkgs> { } ,
target-os ? " a l l " } :
with pkgs ;
let
projectDeps = import ./default.nix { inherit target-os ; } ;
targetMobile = {
" a n d r o i d " = true ;
" i o s " = true ;
" a l l " = true ;
} . ${ target-os } or false ;
# TODO: Try to use stdenv for iOS. The problem is with building iOS as the build is trying to pass parameters to Apple's ld that are meant for GNU's ld (e.g. -dynamiclib)
_stdenv = stdenvNoCC ;
_mkShell = mkShell . override { stdenv = _stdenv ; } ;
in _mkShell {
buildInputs = [
# utilities
bash
curl
2019-04-29 16:33:40 +00:00
file
2019-04-03 11:06:42 +00:00
git
2019-04-29 16:33:40 +00:00
gnumake
2019-04-03 11:06:42 +00:00
jq
ncurses
lsof # used in scripts/start-react-native.sh
ps # used in scripts/start-react-native.sh
unzip
wget
] ++ lib . optionals targetMobile [ bundler ruby ] ; # bundler/ruby used for fastlane
inputsFrom = [ projectDeps ] ;
2019-04-12 14:38:08 +00:00
TARGET_OS = target-os ;
2019-04-03 11:06:42 +00:00
shellHook =
''
set - e
2019-04-29 16:33:40 +00:00
$ { projectDeps . shellHook }
STATUS_REACT_HOME = $ ( git rev-parse - - show-toplevel )
if [ ! - f $ STATUS_REACT_HOME/.ran-setup ] ; then
$ STATUS_REACT_HOME/scripts/setup
touch $ STATUS_REACT_HOME/.ran-setup
2019-04-03 11:06:42 +00:00
fi
set + e
'' ;
}