Skip to content

Commit

Permalink
Fix nix installation
Browse files Browse the repository at this point in the history
Nix now requires -L, I’ve gone ahead and just normalized everything to
use -sfL which we were already using in one place.

changelog_begin
changelog_end
  • Loading branch information
cocreature committed Jun 18, 2020
1 parent 46e81d9 commit 9531233
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Our builds require various development dependencies (e.g. Java, Bazel, Python),

On Linux and Mac `dev-env` can be installed with:

1. Install Nix by running: `bash <(curl https://nixos.org/nix/install)`
1. Install Nix by running: `bash <(curl -sfL https://nixos.org/nix/install)`
2. Enter `dev-env` by running: `eval "$(dev-env/bin/dade assist)"`

If you don't want to enter `dev-env` manually each time using `eval "$(dev-env/bin/dade assist)"`,
Expand Down
2 changes: 1 addition & 1 deletion dev-env/lib/dade-dump-profile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ check_nix_version() {
[[ $current_major -eq $NIX_MAJOR && $current_minor -eq $NIX_MINOR && $current_patch -lt $NIX_PATCH ]];
then
errcho "WARNING: Version ${current_major}.${current_minor}.${current_patch} detected, but ${NIX_MAJOR}.${NIX_MINOR}.${NIX_PATCH} or higher required."
errcho "Please run 'nix upgrade-nix' or 'curl https://nixos.org/nix/install | sh' to update Nix."
errcho "Please run 'nix upgrade-nix' or 'curl -sfL https://nixos.org/nix/install | sh' to update Nix."
fi
else
errcho "WARNING: Unexpected output of 'nix-env --version' ($current), dev-env might not work properly. Contact #disc-enterprise-pipe immediately!"
Expand Down
2 changes: 1 addition & 1 deletion dev-env/lib/ensure-nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ensure_nix() {
fi

echo "[dev-env] Nix is not installed on your machine." >&2
echo "[dev-env] Run \`bash <(curl https://nixos.org/nix/install)\`" >&2
echo "[dev-env] Run \`bash <(curl -sfL https://nixos.org/nix/install)\`" >&2
return 1
}

Expand Down
2 changes: 1 addition & 1 deletion infra/macos/2-vagrant-files/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ log "Created /nix partition."
su -l vsts <<'END'
set -euo pipefail
export PATH="/usr/local/bin:/usr/sbin:$PATH"
bash <(curl https://nixos.org/nix/install)
bash <(curl -sfL https://nixos.org/nix/install)
echo "build:darwin --disk_cache=~/.bazel-cache" > ~/.bazelrc
END

Expand Down
2 changes: 1 addition & 1 deletion infra/vsts_agent_linux_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ chown --recursive root:root /home/vsts/agent/{*.sh,bin,externals}

# This needs to run inside of a user with sudo access
echo "vsts ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/nix_installation
su --command "sh <(curl https://nixos.org/nix/install) --daemon" --login vsts
su --command "sh <(curl -sfL https://nixos.org/nix/install) --daemon" --login vsts
rm /etc/sudoers.d/nix_installation

# Note: the "hydra.da-int.net" string is now part of the name of the key for
Expand Down

0 comments on commit 9531233

Please sign in to comment.