←back to thread

MacOS Catalina: Slow by Design?

(sigpipe.macromates.com)
2031 points jrk | 6 comments | | HN request time: 0.001s | source | bottom
Show context
soraminazuki ◴[] No.23274749[source]
Up until the release of Catalina, I've always upgraded to the latest version of macOS within a month or two. But some of the changes this time is really stopping me from upgrading.

As of Catalina, there's no sane way to install the Nix package manager without losing functionality because macOS now disallows creating new files in the root directory[1]. Nix stores its packages in the /nix directory and it's not possible to migrate without causing major disruptions for existing NixOS and other Linux users. This is too bad, since apart from Nix being a nice package manager, it also provides a sane binary package for Emacs. The Homebrew core/cask versions only provides a limited feature set[2][3].

[1]: https://github.com/NixOS/nix/issues/2925

[2]: https://github.com/Homebrew/homebrew-core/issues/31510

[3]: https://github.com/caldwell/build-emacs/search?q=support+is%...

replies(7): >>23274866 #>>23274876 #>>23275063 #>>23275095 #>>23275183 #>>23276409 #>>23276458 #
glofish ◴[] No.23275063[source]
IMHO the original choice of the path seems incredibly ill-advised and the main burden lies with the original developers.

sometimes old errors and mistakes come back and bite

replies(6): >>23275118 #>>23275134 #>>23275147 #>>23275200 #>>23275256 #>>23277290 #
1. kempbellt ◴[] No.23275256[source]
If you truly want to be "cross-platform" with long-term future proofing in mind, `/nix` is (edit: was) probably the most stable choice.

I get it, people are sensitive about the root directory. "But it's where ALL the stuff lives!". So yeah, try not to ever run 'rm -rf /' (even though this is blocked in most cases now).

But why make it completely inaccessible for creating files/directories in? So much hand-holding for people to make it impossible for a user to ever make a mistake just locks down the ecosystem more, forcing developers to implement proprietary hacks that don't scale properly.

`/var/opt/nix` and `/opt/nix` are options, sure. But you cannot guarantee that those directories will exist on every platform. And if you have to create them, why is this better than `/nix`?

replies(1): >>23275824 #
2. catalogia ◴[] No.23275824[source]
If you have to `mkdir /nix`, what's wrong with `mkdir -p /opt/nix`? I don't see how one is "more stable" than the other. The big difference between the two is the later conforms to convention while the former doesn't.
replies(1): >>23276233 #
3. kempbellt ◴[] No.23276233[source]
`mkdir -p /opt/nix` assumes that there is a convention, and that this is the correct convention - which may not be the case for every situation, and would result in creating unnecessary nested directories.

You could make a more sophisticated installation script that attempts to install Nix into conventional locations depending on the specific operating system - or user input - but if you want a simple catch-all, simple installation script `/nix` was a perfect cross-platform installation location, until now.

replies(1): >>23276689 #
4. catalogia ◴[] No.23276689{3}[source]
> `mkdir -p /opt/nix` assumes that there is a convention

A correct assumption on virtually all relevant extant systems...

> which may not be the case for every situation

In the supposed scenario where the assumption isn't correct, the downside of /opt/nix vs /nix is basically insignificant. What's the overhead of one level of directory nesting, a single extra inode? Big whoop.

replies(1): >>23277185 #
5. kempbellt ◴[] No.23277185{4}[source]
And what is the issue with leaving it as `/nix`, which is (was) accessible on virtually all extant systems? Other than "the root folder is special!"
replies(1): >>23277775 #
6. catalogia ◴[] No.23277775{5}[source]
Nothing was wrong with it, except that it violated convention. As I said: "The big difference between the two is the later conforms to convention while the former doesn't."

Violating convention comes with risk. Whether violating convention and assuming that risk is a good idea depends on whether the risk is worth the reward. For Nix, I don't think it was.