aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTravis A. Everett <travis.a.everett@gmail.com>2020-10-19 11:54:21 -0500
committerTravis A. Everett <travis.a.everett@gmail.com>2020-10-19 12:28:08 -0500
commitf289bdb9d4e8432160c5dcdc037a930b2025d11b (patch)
tree970bf38e13fa3bd848bd8470ab27ce6210a36d26 /scripts
parentc40bad415104398450866d32682011db0acb0310 (diff)
discourage casual Big Sur installs
Diffstat (limited to 'scripts')
-rw-r--r--scripts/install-nix-from-closure.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh
index 4e64f3d43..ea2e47b7f 100644
--- a/scripts/install-nix-from-closure.sh
+++ b/scripts/install-nix-from-closure.sh
@@ -27,6 +27,15 @@ if [ "$(uname -s)" = "Darwin" ]; then
IFS='.' read macos_major macos_minor macos_patch << EOF
$(sw_vers -productVersion)
EOF
+ # TODO: this is a temporary speed-bump to keep people from naively installing Nix
+ # on macOS Big Sur (11.0+, 10.16+) until nixpkgs updates are ready for them.
+ # *Ideally* this is gone before next Nix release. If you're intentionally working on
+ # Nix + Big Sur, just comment out this block and be on your way :)
+ if [ "$macos_major" -gt 10 ] || { [ "$macos_major" -eq 10 ] && [ "$macos_minor" -gt 15 ]; }; then
+ echo "$0: nixpkgs isn't quite ready to support macOS $(sw_vers -productVersion) yet"
+ exit 1
+ fi
+
if [ "$macos_major" -lt 10 ] || { [ "$macos_major" -eq 10 ] && [ "$macos_minor" -lt 12 ]; } || { [ "$macos_minor" -eq 12 ] && [ "$macos_patch" -lt 6 ]; }; then
# patch may not be present; command substitution for simplicity
echo "$0: macOS $(sw_vers -productVersion) is not supported, upgrade to 10.12.6 or higher"