nix-darwin icon indicating copy to clipboard operation
nix-darwin copied to clipboard

Homebrew on apple silicon (aarch64) installs to /opt/homebrew

Open antifuchs opened this issue 3 years ago • 1 comments

From https://docs.brew.sh/Installation, it sounds like apple silicon homebrew installs will always go into /opt/homebrew; that means the path check in https://github.com/LnL7/nix-darwin/blob/3b28c4675a4c6a1fa2a1448e8e9abcfb4cb5c770/modules/homebrew.nix#L207-L211 will never pick it up.

I tried adding a symlink from /usr/local/bin/brew -> /opt/homebrew/bin/brew, and that made the plugin attempt to bundle, but casks failed to install due to the different HOMEBREW_CELLAR settings:

Warning: your HOMEBREW_PREFIX is set to /usr/local but HOMEBREW_CELLAR is set
to /opt/homebrew/Cellar. Your current HOMEBREW_CELLAR location will stop
you being able to use all the binary packages (bottles) Homebrew provides. We
recommend you move your HOMEBREW_CELLAR to /usr/local/Cellar which will get you
access to all bottles."
Error: Download failed on Cask 'monodraw' with message: No such file or directory @ dir_s_rmdir - /usr/local/var/homebrew/locks/bb28a6f9dfb330ea41ea6e5184164548dd38b1cb2eebedbe873a141f4445bdaf--Monodraw-b107.zip.incomplete.lock

I'm guessing we just have to call the brew program in either /opt/homebrew/bin or /usr/local/bin.

antifuchs avatar Apr 22 '21 23:04 antifuchs

I think this issue has been fixed by #418.

sellout avatar Jun 17 '22 20:06 sellout

Yeah, I believe it is. @domenkozar, can you close?

malob avatar Aug 23 '22 23:08 malob