Fixes https://github.com/NixOS/nix/issues/240. Apparently 'tar -xf' can decompress xz files on macOS nowadays.
type
command -v
In POSIX sh, `type` is undefined. cf. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html#tag_20_22_04
`which` isn't necessarily portable, but `command -v` is an equivalent form. Additionally, the `\'` is not necessary, as it is already quoted by `"`.