Live data from Hacker News

Ask HN: Best Alternative to Homebrew in 2021?

news.ycombinator.com

151–160 of 314 posts

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

#151

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,…

Regarding GUI applications: you're probably talking about the Nixpkgs repository, rather than the Nix tool itself.

I use the following Nix function to install GUI applications https://github.com/cmacrae/.nixpkgs/blob/d4b51eb414b0edaffae...

It doesn't work for everything, but I use it at the moment for Amethyst, DBeaver, DockerDesktop, Emacs, Firefox, iTerm2, Postman, Slack and VNCViewer.

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

#152

Homebrew project leader here: I hope you're able to find a package manager that better fits your needs and I'm sorry that Homebrew is not currently doing so. --- Homebrew upgrades dependencies and dependents of those dependencies (which, admittedly, can feel like unrelated) on installation and upgrade. As mentioned in other comments, you can customise this behaviour with `HOMEBREW_NO_INSTALL_UPGRADE` or `HOMEBREW_NO_…

Mike - just wanted to say thanks for all you (and the other Homebrew volunteers) do! My mac dev experience is 100x better with Homebrew - it's literally the first thing I install when I get a new machine.

Perhaps in situations like this Homebrew could alert the user "Hey, this package hasn't been updated in a while and 40 other packages depend on it so this is going to take a while. Press enter to confirm or cancel and use an alternative method (HOMEBREW_NO_INSTALL_UPGRADE) to just upgrade the one package. Caveat - this may break things."

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

#153

Homebrew project leader here: I hope you're able to find a package manager that better fits your needs and I'm sorry that Homebrew is not currently doing so. --- Homebrew upgrades dependencies and dependents of those dependencies (which, admittedly, can feel like unrelated) on installation and upgrade. As mentioned in other comments, you can customise this behaviour with `HOMEBREW_NO_INSTALL_UPGRADE` or `HOMEBREW_NO_…

Wondering if this would be solved by using brew pin? http://www.valentinourbano.com/brew-pin.html

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

#155

A lot of the usual "it's bad" "it's not bad for me" discourse in these threads. Could people raise the bar a bit and talk about specific problems they have had with homebrew - other than the auto-update, which we've already noted can be changed by setting HOMEBREW_NO_AUTO_UPDATE=1? Thanks.

They deprecated the "brew cask install" then completely removed it only ~20 days later (in late December!), breaking many other projects in the process.

I'm a bit wary on relying on it now. It's a shame, because it's a really useful tool (and I actually like the auto-update).

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

#156

Homebrew project leader here: I hope you're able to find a package manager that better fits your needs and I'm sorry that Homebrew is not currently doing so. --- Homebrew upgrades dependencies and dependents of those dependencies (which, admittedly, can feel like unrelated) on installation and upgrade. As mentioned in other comments, you can customise this behaviour with `HOMEBREW_NO_INSTALL_UPGRADE` or `HOMEBREW_NO_…

Mike - just wanted to say thanks for all you (and the other Homebrew volunteers) do! My mac dev experience is 100x better with Homebrew - it's literally the first thing I install when I get a new machine. Perhaps in situations like this Homebrew could alert the user "Hey, this package hasn't been updated in a while and 40 other packages depend on it so this is going to take a while. Press enter to confirm or cancel a…

+1 I love homebrew. I just set up my new M1 Max machine and half of the setup work was just brew commands to install cli stuff and casks <3. It's such a joy to not need to go to a bazillion websites to download dmgs

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

#157

Homebrew project leader here: I hope you're able to find a package manager that better fits your needs and I'm sorry that Homebrew is not currently doing so. --- Homebrew upgrades dependencies and dependents of those dependencies (which, admittedly, can feel like unrelated) on installation and upgrade. As mentioned in other comments, you can customise this behaviour with `HOMEBREW_NO_INSTALL_UPGRADE` or `HOMEBREW_NO_…

yeah really unfair to blame a package manager for being unexpected when the context is installing/updating a python package. Don't care what package manager you use, python is always going to be a mess

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

#158

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. May…

> Rather, it's worth explaining why it's bad to use.

My biggest problem is that it's not version-controlled. I don't use home-manager, and (still) haven't looked into Nix flakes.

Instead, I put `export PATH="/path/to/my/repo/result/bin:$PATH"` in my ~/.bashrc, and inside that repo I have a default.nix file:

    buildEnv {
      name  = "my-packages";
      paths = [ foo bar baz ... ];
    }
Running `nix-build` will update the result/bin symlink to point at the new applications.

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

#159

Earlier quoted context omitted.

I think the problem with Nix is that it is actually not a package manager but a build tool (that provides some package management utilities). People try Nix with the assumption that it should be as easy as apt-get (for example), but found tutorials with a block of code in a weird language... Sure, you will eventually need to use the Nix language if you want to have complex and reusable configurations, but this is act…

> I think the problem with Nix is that it is actually not a package manager but a build tool (that provides some package management utilities). People try Nix with the assumption that it should be as easy as apt-get (for example), but found tutorials with a block of code in a weird language... Indeed, I've been using Nix for many years (on Ubuntu, NixOS and macOS), and I now find the apt-get style 'considered harmful…

Just wondering, what is the benefit of doing this over nix-env for system-wide applications?

For project specific environments, I usually use `shell.nix` (maybe I should switch to flakes now) together with direnv that runs nix-shell automatically when you enter the directory.

For beginners to Nix, I think they should do the transition gradually, there are so many concepts in Nix that may be unfamiliar to them. I think getting a system to work quickly (maybe in a not so idiomatic way) is more encouraging than asking them to read Nix Pills and understand how packaging works in Nix :)

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

#160

Homebrew project leader here: I hope you're able to find a package manager that better fits your needs and I'm sorry that Homebrew is not currently doing so. --- Homebrew upgrades dependencies and dependents of those dependencies (which, admittedly, can feel like unrelated) on installation and upgrade. As mentioned in other comments, you can customise this behaviour with `HOMEBREW_NO_INSTALL_UPGRADE` or `HOMEBREW_NO_…

OP here, thanks for clarifying this - I can imagine it's a super complex problem and I truly appreciate all the work that you (and other contributors) have put into this project.

My only point (and a source of confusion) here is that I never anticipated the cascading effect that installing a single package can have on seemingly unrelated parts of the system. I've been using homebrew for many years and as far as I remember, the only time anything broke like this was when I explicitly ran update/upgrade.

I'm going to try HOMEBREW_NO_INSTALL_UPGRADE/HOMEBREW_NO_AUTO_UPDATE — it does seem like a more intuitive default, but again, I don't know anything about how homebrew works under the hood.

Thanks again!

Post reply on HN