Merge pull request #184 from cachix/macos-bump
MacOS-12 fix & Nix 2.16.1
This commit is contained in:
		| @@ -19,6 +19,9 @@ add_config() { | |||||||
| } | } | ||||||
| # Set jobs to number of cores | # Set jobs to number of cores | ||||||
| add_config "max-jobs = auto" | add_config "max-jobs = auto" | ||||||
|  | if [[ $OSTYPE =~ darwin ]]; then | ||||||
|  |   add_config "ssl-cert-file = /etc/ssl/cert.pem" | ||||||
|  | fi | ||||||
| # Allow binary caches for user | # Allow binary caches for user | ||||||
| add_config "trusted-users = root ${USER:-}" | add_config "trusted-users = root ${USER:-}" | ||||||
| # Add github access token | # Add github access token | ||||||
| @@ -66,7 +69,7 @@ echo "installer options: ${installer_options[*]}" | |||||||
|  |  | ||||||
| # There is --retry-on-errors, but only newer curl versions support that | # There is --retry-on-errors, but only newer curl versions support that | ||||||
| curl_retries=5 | curl_retries=5 | ||||||
| while ! curl -sS -o "$workdir/install" -v --fail -L "${INPUT_INSTALL_URL:-https://releases.nixos.org/nix/nix-2.15.1/install}" | while ! curl -sS -o "$workdir/install" -v --fail -L "${INPUT_INSTALL_URL:-https://releases.nixos.org/nix/nix-2.16.1/install}" | ||||||
| do | do | ||||||
|   sleep 1 |   sleep 1 | ||||||
|   ((curl_retries--)) |   ((curl_retries--)) | ||||||
| @@ -78,14 +81,6 @@ done | |||||||
|  |  | ||||||
| sh "$workdir/install" "${installer_options[@]}" | sh "$workdir/install" "${installer_options[@]}" | ||||||
|  |  | ||||||
| if [[ $OSTYPE =~ darwin ]]; then |  | ||||||
|   # macOS needs certificates hints |  | ||||||
|   cert_file=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt |  | ||||||
|   echo "NIX_SSL_CERT_FILE=$cert_file" >> "$GITHUB_ENV" |  | ||||||
|   export NIX_SSL_CERT_FILE=$cert_file |  | ||||||
|   sudo launchctl setenv NIX_SSL_CERT_FILE "$cert_file" |  | ||||||
| fi |  | ||||||
|  |  | ||||||
| # Set paths | # Set paths | ||||||
| echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH" | echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH" | ||||||
| # new path for nix 2.14 | # new path for nix 2.14 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user