Hacker News new | ask | show | jobs
by Daegalus 74 days ago
You can literally use Brew for a lot of things. Linux brew is pretty good these days.

If you want this makefile way, use Justfiles,which are modernized Makefiles so you dont have 30 years of cruft and such being injected into it.

But also at the end of the day, Mise exists and is directly targetted for this.

I personally use Brew bundle files + Dotter for my home/tools management. Brew bundles also support Flatpaks these days and i can install those too.

1 comments

> Linux brew is pretty good these days.

What's the use case for homebrew on Linux these days? Most distributions have their own package manager, which you almost always end up using anyways, so already you're adding an extra package manager. Besides that, most of the community isn't using homebrew, so clearly won't have "more" packages, and the packages it'll have will be less reviewed than the ones in your distribution. I can't really see any point to use homebrew on Linux except "I used to use it on macOS", which doesn't feel that strong of a use case really.

I use an immutable distribution, i dont use the package manager as it is antithesis to the concept. The current most popular immutable distros (Bluefin, Bazzite, Aurora, etc) use Bluefin for CLI tools, or even some apps that are tricky to get full functionality from Flatpaks but cant do system install.

Sooo, i dont have a system package manager to use to add more packages, not without building my own image ontop of Bluefin/Bazzite.

Also, all the packages on Brew are fairly well tested, while mostly on OSX, they officially release Linux prebuilts for Linux and get tested equally. Brew has been around for ages.

And I havent used MacOS for 8-9 years, and only for a small stint. Not long enough for it to do things.

Also per official stats: https://formulae.brew.sh/analytics/os-version/90d/ Ubuntu makes up ~20% of brew usage, and the Universal Blue family is about 2% and growing.

There is absolutely a usecase for it and its just as good if not better, as most tools are more likely to be statically built, and you donthave a giant dependency mess and other nonsense to deal with. Its cleaner.

On an immutable distro, its a lot of Flatpak, AppImage, and Brew/Mise/etc. Layering packages is greatly discouraged and as the ecosystem moves towards Bootc images over OSTREE ones, the option will go away entirely. You either build a custom image with yoru custom stuff layered on yourself (there are templates and Github CI stuff to help with it.) or you use other package managers.

Also another win is weith Brew, i can reproduced my tools and environment quickly and dont have to deal with Distro quirks. Brew works the same on almost every distro, same pathings, same behavior, and even offers the Brewfiles to let me specify my setup.

I recently switched jobs and had my work setup installed and created within mins of booting into a fresh install and I was working shortly after.

> I use an immutable distribution, i dont use the package manager as it is antithesis to the concept

I don't think "immutable distribution" typically means "can't install applications", it's more about the system files than anything, not across absolutely everything, similar to "functional programming" doesn't mean "no side-effects allow anywhere" because then you couldn't draw to the screen. All those OSes have included utilities for installing packages ("programs"), otherwise they wouldn't be very useful.

Besides that, even going by your own understanding, if you install homebrew on a immutable distribution, doesn't that mean homebrew is "antithesis to the concept" too, as much as any other package/program manager?

No, because installing something in the userspace is different from system. Most package managers install to system locations, like /usr and so on. Homebrew installs into /home/linuxbrew/.linuxbrew and is useable from userspace.

Immutable might not be the best term, its more atomic. And while you can install packages with rpm-ostree for example, it gets layered ontop, and the more packages you layer, the more likely an upgrade fails, or a rebase fails. Hence you build a custom image, or adopt a user-space solution.

The method to install applications is again, userspace focused ones. for GUI apps its Flatpak and AppImage. For CLI tools it can be appImage, but for others its Mise, Brew, asdf, or even Nix.

The antithesis is installing applications onto the immutable portion of the system, or messing with it in any way (by layer packages ontop of the immutable parts). Installing into userspace is the preferred method. So these "immutable distributions" do have ways to install "packages (programs)" and that is Flatpak, Brew, AppImage, etc and not the system package manager.

It is why they are moving away from even having Layering as an option.

> No, because installing something in the userspace is different from system. Most package managers install to system locations, like /usr and so on. Homebrew installs into /home/linuxbrew/.linuxbrew and is useable from userspace.

I see, so it's the default settings of the package managers you don't like? And prefer to use homebrew with sane defaults, rather than configuring your package manager to install things somewhere else?

I guess I was confused about the whole "immutable and no package manager" but then also "immutable and yes, other package manager" thing, but if it makes sense for you, I'm happy you found a setup that works for you :)