Live data from Hacker News

Ask HN: Best Alternative to Homebrew in 2021?

news.ycombinator.com

71–80 of 314 posts

Re: Ask HN: Best Alternative to Homebrew in 2021?

#71

nix. It's confusing, but we'll get there. You'll need/want: - nix, the tool/build system. - nixpkgs, the world's most up-to-date and underfunded package repository. - nix-darwin, bringing a NixOS experience to Darwin. Not perfect, but pretty damn great. And optionally, - home-manager, a nix-based opinionated tool to manage dotfiles and other stuff in your home directory. And finally, some things to avoid and experime…

So you're saying use nix flakes instead of `nix env -i`?

I've been using `nix env -i` without any issues till now, but I'll explore nix flakes.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#72
Just disable the auto-updates.

Also, I'm 100% certain all it did was update the formulae (similar to apt-get update, NOT apt-get upgrade).

I've been using homebrew for years and this is the default behavior, so unless you purposefully set it up to upgrade everything this is PEBKAC.

AFAIK the only time it upgrades everything is when you do a blanket `brew upgrade`. And if you're pinned to something like postgresql@10 it will stay at that major version.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#74
post #17

I think, you don't need to choose any other package manager because homebrew is the most mature thing on macos. Just disable autoupdate when installing something: HOMEBREW_NO_AUTO_UPDATE=1 brew install

If you have an old version of a package, say OpenSSL, that was installed a year ago when you wanted PackageA, then both will be updated when you get PackageB which also depends on it. B’s bottle only refers to the new OpenSSL, and the old version is deleted so you need the new A bottle. No auto update just means you use the state of homebrew-core that you had before you ran the command, rather than updating it right before using it.

It makes sense, but then I don’t do full upgrades and get delayed just like OP. I live with it.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#75
post #17

I think, you don't need to choose any other package manager because homebrew is the most mature thing on macos. Just disable autoupdate when installing something: HOMEBREW_NO_AUTO_UPDATE=1 brew install

Homebrew stinks of over-optimization and deletionism. In contrast to how it used to be, Homebrew now seems designed for people that only want popular bleeding edge packages, and nobody else. If I just wanted to install google-chrome, sublime, and skype, I would use the app store. I used to use Homebrew to install more obscure packages that were useful to me, like Arduino, Processing, and some specialized bluetooth to…

I feel your pain, but can't help blaming Apple rather than Homebrew. They made an OS that users can't bear to upgrade because of removed features, homebrew is merely following their lead and focusing on bleeding edge users. Maybe the logic is: if you don't want constant churn you wouldn't be on a mac.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#76

nix. It's confusing, but we'll get there. You'll need/want: - nix, the tool/build system. - nixpkgs, the world's most up-to-date and underfunded package repository. - nix-darwin, bringing a NixOS experience to Darwin. Not perfect, but pretty damn great. And optionally, - home-manager, a nix-based opinionated tool to manage dotfiles and other stuff in your home directory. And finally, some things to avoid and experime…

I disagree with "don't use nix-env --install; use instead".

I see "nix-env --install" as a gateway drug to using Nix. It's effortless, and already easy to see benefits from using Nix (like you can easily get the same set of packages on different OSs).

Rather, it's worth explaining why it's bad to use. The footgun I ran into was that I'd caused a messy state by installing something and forgetting I'd installed it.

Maybe nix flakes and home-manager and nix-darwin are really cool.. but they're also much harder to use, and surely overwhelming for someone who just wants a way to install packages. I think it's like telling someone to learn Kubernetes when they're wondering how to serve the website they wrote. -- I think it's easier to appreciate these once you've gotten your feet wet with nix.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#77
post #7

I didn’t think brew upgrade d packages automatically? Just update d the index? Am I missing something here?

It changed a while back. Definitely surprised me in a bad way in the last year or two and I went through something similar to the OP. That said, I stuck the env variable in my shell setup and I would point out brew does include tooling to upgrade databases from one major version of Postgres to the next so you can get back and running (unless you have cause to stick with a certain version to match server setup, which is a bit of a pain).

Re: Ask HN: Best Alternative to Homebrew in 2021?

#78

nix. It's confusing, but we'll get there. You'll need/want: - nix, the tool/build system. - nixpkgs, the world's most up-to-date and underfunded package repository. - nix-darwin, bringing a NixOS experience to Darwin. Not perfect, but pretty damn great. And optionally, - home-manager, a nix-based opinionated tool to manage dotfiles and other stuff in your home directory. And finally, some things to avoid and experime…

Nix with nix-direnv is awesome!

Re: Ask HN: Best Alternative to Homebrew in 2021?

#79
I'm surprised people still use postgresql from homebrew. Like honestly, I use brew for any CLI command only like zsh and git. Well maybe some programming language as well but I would never, ever install database with it unless I'm desperate. Anything that can be dockerized, just use docker.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#80
post #12

The fact that homebrew is awful is one of the huge reasons I don’t use MacOS for development like all my co-workers. Instead I use Windows with WSL because the company won’t allow me a Linux laptop. If I had to use a Mac my solutions would be to alway use Docker, a virtual machine, or a remote dev environment of some kind.

I feel the same way. I've had a very good experience running xubuntu.
Post reply on HN