#!/usr/bin/env bash

if [ -f /etc/profile ]; then
   source /etc/profile > /dev/null
fi

if [ -f ~/.bash_profile ]; then
   source ~/.bash_profile > /dev/null
elif [ -f ~/.bash_login ]; then
   source ~/.bash_login > /dev/null
elif [ -f ~/.profile ]; then
   source ~/.profile > /dev/null
fi

#!/usr/bin/env bash

if [ -f /etc/profile ]; then
   source /etc/profile > /dev/null
fi

if [ -f ~/.bash_profile ]; then
   source ~/.bash_profile > /dev/null
elif [ -f ~/.bash_login ]; then
   source ~/.bash_login > /dev/null
elif [ -f ~/.profile ]; then
   source ~/.profile > /dev/null
fi

if [ -e ~/.nix-profile/etc/profile.d/nix.sh ]; then . ~/.nix-profile/etc/profile.d/nix.sh; fi

Build Phase scripts ensure nix is in PATH
[ios] Build Phase scripts ensure nix is in PATH

The official nix installation script detects which shell it's being invoked
from and adds a line to the appropriate login script.  A user who installs nix
from a zsh session will have that line added to ~/.zprofile.  That file is not
sourced by our bash-based build scripts.  As a result, such users will be
unable to run those scripts unless they happened to have added the line to one
of the login scripts which we do source, such as ~/.bash_profile, whether
manually, or due to previously installing nix from a bash terminal.

Similar errors can occur with users of any tool that manages dependencies by
manipulating the PATH variable rather than installing them to directories
guaranteed to be in a non-login sh session, such as /usr/local/bin.  Compare
the operations of nvm to homebrew, for example.
