Hacker News new | ask | show | jobs
by Macha 1038 days ago
The problem is binary artifacts of compiled software. Those native binaries have hardcoded paths to dependencies and so by changing the location, you're forcing homebrew to compile everything locally to use a different path. It's the same reason Nix is still at /nix, despite the quirky installation requirements it forces on modern Macs with SIP.

There are tools to rewrite links in binaries, but they only work until you get a program calling dlopen or equivalent

1 comments

I was simply responding to the statement

> its possible to choose a custom installation location, even on Intel Macs if you prefer.

Whilst it is physically possible, it won't work.

What would be better is a plan. Putting it in a different system folder like `opt` isn't much better.

It does work, it's just not supported because the experience is worse. Open source (Homebrew included) is full of lots of plans: it's lacking people willing and able to execute on those plans. When or if that happens: Homebrew will support installations in more locations.
How is the experience worse if it works?

The other explanations imply that it may not work due to hard coded paths.

Because of the hardcoded paths, the precompiled artifacts will not work. Because of this, homebrew will need to run the build script locally. This means that the process takes longer, which is what makes the experience worse.