Live data from Hacker News

Ask HN: Best Alternative to Homebrew in 2021?

news.ycombinator.com

11–20 of 314 posts

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

#11

Macports

One should bear in mind that it seems MacPorts takes a much more puritan approach to packaging than Homebrew, as this 18 month old ticket asking for awscli v2 (and its comment thread) shows: https://trac.macports.org/ticket/60452

I didn't dig into the process for a user to add their own ports, or share new ports with a team, in order to more fully compare the two packagers, but that ticket stood out to me

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

#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.

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

#13
My experience is that both (Macports, Homebrew) are comically unreliable and frustrating to use. That said, with my insistence to install under $HOME, Macports seems to work slightly better. But truly, I got the best results from downloading and compiling every single flipping dependency myself.

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

#14
post #6

You can disable autoupdate by setting HOMEBREW_NO_AUTO_UPDATE env https://github.com/Homebrew/brew/blob/7d31a70373edae4d8e78d9...

This seems to control whether to upgrade homebrew itself?

Upgrade homebrew itself AND other packages, see https://computingforgeeks.com/prevent-homebrew-auto-update-o...

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

#16
post #5

nix has a very steep learning curve, but I have been using it on macOS for a while now. Can’t recommend it enough. Even started using it on my personal PC, which allows me to use the same nix flake on both systems. EDIT: Personal PC is running NixOS not Windows.

Nix does have a steep learning curve. But, you're also very likely to install most of what you want easily.

Some other downsides:

- Nix installations can take time. Nix packages can either build from source, or download from a binary cache. If it's not in the cache, it will build from source.

- Nix can take up a significant of storage space.

However, e.g. Nix is amazing at rolling back package installs; and installing a package with nix won't ever break another package installed by nix.

If you like the phrases "pure/immutable", "declarative", "functional programming", etc. then you'll like Nix. -- If those words don't excite you, then you'll not like Nix.

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

#18
I just reached the same breaking point -- and normally I am pretty sympathetic to software jank, but the maintainer of homebrew is so actively hostile and rude that my degree of empathy is significantly less -- and switched to Nix, which is quite good, conditional on three gotchas:

1. Nix has very limited support for GUI applications of the kind that you'd find in `brew cask`. Not no support, some of them are there, but limited support compared to brew. If you use brew as an out-of-the-box install-everything setup like me, you'll not be able to replicate that easily with Nix.

2. Nix can't currently build Swift applications because of some Xcode something I didn't fully understand.

3. I found a small number of packages that are broken on Nix on my aarch64 / M1 MacBook Air (and marked broken, so when you try to install it complains) and a small number that are broken without being marked broken. In specific, I think R was one that surprised me -- this is a major programming language and although the build requirements are onerous (it's a mix of C and Fortran), I would think it would work.

That being said the actual process of installing, updating, and upgrading seems much faster and dramatically less shitty than homebrew, and so I recommend migrating stuff off of brew anyway.

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

#19
sorry OP by this is a clickbait rant from someone who just did not made his homework and ended loosing time and data.

- Homebrew is rolling - always was and never claimed otherwise.

- OTOH for key packages (say databases) it has available versioned bottles. for postgresql one have:

  - postgresql@10
  - postgresql@12
  - postgresql@9.4
  - postgresql@9.6
  - postgresql (points to latest) 
  - postgresql@11
  - postgresql@13
  - postgresql@9.5
- Finally, no one is forced to update everything at all. run `brew outdated` and pick whatever you want updated then `brew update foo`...

In short, none of what happened to the OP is due to inherent flaws in homebrew... QED.

Post reply on HN