Nix has a way of doing this as well, just needs a better UX (like most of nix).
I see that there's a bunch of `nix-whatever` tools around, but even their names aren't much sensible.
I'm not in doubt that nix is technically superior to homebrew, but UX-wise it's at least been a disappointing experience for me.
Luckily guix is a better UX for nix. =)