Skip to content

Commit 6ed004b

Browse files
authored
Merge pull request #184 from cachix/macos-bump
MacOS-12 fix & Nix 2.16.1
2 parents 16b9514 + e278794 commit 6ed004b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

install-nix.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ add_config() {
1919
}
2020
# Set jobs to number of cores
2121
add_config "max-jobs = auto"
22+
if [[ $OSTYPE =~ darwin ]]; then
23+
add_config "ssl-cert-file = /etc/ssl/cert.pem"
24+
fi
2225
# Allow binary caches for user
2326
add_config "trusted-users = root ${USER:-}"
2427
# Add github access token
@@ -66,7 +69,7 @@ echo "installer options: ${installer_options[*]}"
6669

6770
# There is --retry-on-errors, but only newer curl versions support that
6871
curl_retries=5
69-
while ! curl -sS -o "$workdir/install" -v --fail -L "${INPUT_INSTALL_URL:-https://releases.nixos.org/nix/nix-2.15.1/install}"
72+
while ! curl -sS -o "$workdir/install" -v --fail -L "${INPUT_INSTALL_URL:-https://releases.nixos.org/nix/nix-2.16.1/install}"
7073
do
7174
sleep 1
7275
((curl_retries--))
@@ -78,14 +81,6 @@ done
7881

7982
sh "$workdir/install" "${installer_options[@]}"
8083

81-
if [[ $OSTYPE =~ darwin ]]; then
82-
# macOS needs certificates hints
83-
cert_file=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
84-
echo "NIX_SSL_CERT_FILE=$cert_file" >> "$GITHUB_ENV"
85-
export NIX_SSL_CERT_FILE=$cert_file
86-
sudo launchctl setenv NIX_SSL_CERT_FILE "$cert_file"
87-
fi
88-
8984
# Set paths
9085
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
9186
# new path for nix 2.14

0 commit comments

Comments
 (0)