Skip to content

Commit

Permalink
Merge pull request #1886 from digitallyinduced/update-ihp-new
Browse files Browse the repository at this point in the history
Update ihp-new
  • Loading branch information
mpscholten authored Jan 3, 2024
2 parents 2a109ec + 8560433 commit 3045fb2
Showing 1 changed file with 3 additions and 35 deletions.
38 changes: 3 additions & 35 deletions ProjectGenerator/bin/ihp-new
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ if ! [ -x "$(command -v direnv)" ]; then
read -r -n1 choice
echo ""
case "$choice" in
y | Y) nix-env -iA ${NIXPKGS_ATTR}.direnv ;;
y | Y)
nix profile install nixpkgs#nix-direnv
;;
*)
echo -e "\e[31mPlease install direnv manually and then re-run this program.\e[0m"
exit 1
Expand Down Expand Up @@ -216,40 +218,6 @@ if ! [ -x "$(command -v make)" ]; then
esac
fi

if ! [ -x "$(command -v cachix)" ]; then
echo -e "\e[1m\e[35mCACHIX MISSING\e[0m"
echo -e "IHP uses cachix as a binary cache."
echo -e "Learn more about cachix here: \e[4mhttps://cachix.org/\e[0m"
echo ""
echo ""
echo -e "\e[1mWe will install cachix for you now. Continue? (Type y to proceed) \e[0m"
read -r -n1 choice
echo ""
case "$choice" in
y | Y) nix-env -iA ${NIXPKGS_ATTR}.cachix ;;
*)
echo -e "\e[31mPlease install cachix manually and then re-run this program.\e[0m"
exit 1
;;
esac
fi

if ! grep -s -q "digitallyinduced.cachix.org-1:y+wQvrnxQ+PdEsCt91rmvv39qRCYzEgGQaldK26hCKE=" ~/.config/nix/nix.conf; then
echo -e "\e[1mCachix doesn't seem to be configured\e[0m"
echo -e "IHP provides a cachix cache with binaries for all IHP packages and commonly used dependencies."
echo -e "While not required, this greatly speeds up the installation & build process."
echo -e "This could be a false negative if you use a more complex nix configuration."
echo ""
echo ""
echo -e "\e[1mWe will configure the cache for you now using 'cachix use digitallyinduced'. Continue? (Type y to proceed) \e[0m"
read -r -n1 choice
echo ""
case "$choice" in
y | Y) cachix use digitallyinduced ;;
*) echo -e "Skipping cachix configuration" ;;
esac
fi

BOILERPLATE_GIT_BRANCH="master"

if [[ "$1" == "--elm" ]]; then
Expand Down

0 comments on commit 3045fb2

Please sign in to comment.