mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 00:37:23 +03:00
Fix nix installation (#6400)
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
This commit is contained in:
parent
98e2768aba
commit
2c1d4cb805
@ -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)"`,
|
||||
|
@ -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 () {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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!"
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user