Here’s my attempt (for the nix package manager on macOS):
Have you ever written a custom script which had dependencies? It could be a ruby script requiring a particular set of gems, it could be a shell script that requires up-to-date versions of GNU’s coreutils, or it could even be a bash customization that require a third party library such as
If the answer is yes, you probably know how fragile this can be, for example many of your customizations may break after an OS update, it’s messy trying to share such scripts/customizations with friends (because they have to recreate your environment, and maybe they do not want GNU’s
date command to be the first one found via
Nix allows you to create a central repository for your customizations with explicit dependencies, and without having to install these dependencies into the global namespace/
If the above doesn’t appeal to you, I’m inclined to say that sticking with homebrew is better, because it has a much lower learning curve, and overall it works pretty good. Two exceptions though:
There is no way to get a list of explicitly installed packages. You can use
brew leaves but this may include orphaned dependencies or it may hide explicitly installed commands, because something else installed depend on them.
There is no simple way to uninstall a package with dependencies. The way to do this appears to be to first uninstall all dependencies of the package, ignoring that other stuff may depend on it, then uninstall the root package, and then re-install missing dependencies.
If you find the above unsatisfying, nix should appeal to you.