Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nix installation #6400

Merged
merged 1 commit into from
Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix nix installation
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
commit 586b65b2789ede25e6a3c47d12ac6c853c3fe767
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 -sSfL 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 azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ jobs:

sudo mkdir -p /nix
sudo chown $USER /nix
curl -sfL https://nixos.org/releases/nix/nix-2.3.3/install | bash
curl -sSfL https://nixos.org/releases/nix/nix-2.3.3/install | bash
eval "$(dev-env/bin/dade-assist)"
GCS_KEY=$(mktemp)
cleanup () {
Expand Down
2 changes: 1 addition & 1 deletion ci/dev-env-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [[ ! -e /nix ]]; then
sudo mkdir -m 0755 /nix
sudo chown "$(id -u):$(id -g)" /nix

curl -sfL https://nixos.org/releases/nix/nix-2.3.3/install | bash
curl -sSfL https://nixos.org/releases/nix/nix-2.3.3/install | bash
fi

# shellcheck source=../dev-env/lib/ensure-nix
Expand Down
2 changes: 1 addition & 1 deletion dev-env/bin/nix-update-src-json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repo=$(jq -er '.repo' < "$source")
branch=$(jq -er '.branch // ""' < "$source")

if [[ -n $branch ]]; then
rev=$(curl -sfL "https://api.github.com/repos/$owner/$repo/git/refs/heads/$branch" | jq -r .object.sha)
rev=$(curl -sSfL "https://api.github.com/repos/$owner/$repo/git/refs/heads/$branch" | jq -r .object.sha)
else
rev=$(jq -er '.rev' < "$source")
fi
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 -sSfL 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 -sSfL 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 -sSfL 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 -sSfL 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