Open n8henrie opened 2 months ago
Perhaps something like:
require_util tar "unpack the binary tarball"
- if [ "$(uname -s)" != "Darwin" ]; then
+ if [ "$(uname -s)" != "Darwin" ] || [ "$(command -v tar)" != /usr/bin/tar ]; then
require_util xz "unpack the binary tarball"
fi
(or an explicit if Darwin && command -f tar / else
if that's considered more readable.)
Context from other thread: It sounds like there was a previous attempt to address this, but I guess it was only a partial fix:
Perhaps something like: ...
I was imagining we could just use /usr/bin/tar
when running on macOS (the other threads linked above discuss some reasons that it may not be ideal to send prospective users on a "just install xz" quest)
Alternatively, we could fix this and prevent similar surprises with other tools down the line by cleaning / exporting PATH
early in the script (only on Darwin). That would help prevent issues with tools on the PATH
from nix, homebrew, macports, etc.
Platform
Additional information
Reinstall of an existing multi-user nix installation (to deal with
nixbld
issues on MacOS 15 Sequoia): https://github.com/NixOS/nix/issues/10892 starting an issue as suggested in that thread.Workaround:
PATH=$(getconf PATH) sh <(curl -L https://nixos.org/nix/install)
Output
Priorities
Add :+1: to issues you find important.