top | item 40676937

Brew-Nix: a flake automatically packaging all homebrew casks

78 points| KolenCh | 1 year ago |discourse.nixos.org | reply

32 comments

order
[+] madmax96|1 year ago|reply
I love nix on macOS. But one word of caution: nix uses a very outdated, EOL’d, macOS SDK (https://github.com/NixOS/nixpkgs/issues/101229).
[+] viraptor|1 year ago|reply
In practice, it's not that restricting. It's pretty rare to find something actually requiring a more recent version. (And there's slow progress in updating it)
[+] loveparade|1 year ago|reply
This looks interesting. Personally I have been moving away from homebrew and use nix-darwin (https://github.com/LnL7/nix-darwin) with home-manager for my local software. It has been working great, but there are still a few packages that require Homebrew due to their complex build process. Maybe this helps.
[+] conradev|1 year ago|reply
Same. The story with app bundles in Nix is a little rough, currently, though:

- Located in the nix store, so not indexed by Spotlight

- Not signed so I have to grant permissions all over again when an app gets rebuilt

[+] parhamn|1 year ago|reply
Mind sharing some reasons to switch? Been meaning to check out nix.
[+] aliasxneo|1 year ago|reply
I always have brew available because I inevitably run into issues with Nix packages (primarily managed by home-manager) on a pretty regular basis. Feels like I would be going in the opposite direction by wrapping them in Nix.
[+] pxc|1 year ago|reply
What kinds of issues do you run into most often? What have you run into recently?
[+] ThrowawayTestr|1 year ago|reply
I love how this title is incomprehensible to 99% of people
[+] muixoozie|1 year ago|reply
Yea, I have no idea what a homebrew cask is. (Joking.. I am the 1%)
[+] KolenCh|1 year ago|reply
Reading the comments, may be it is worth clarifying: this allows macOS users with nix package manager to install brew cask (I.e. typically GUI program that companies releases as pkg or dmg, etc., such as Mathematica, GitHub Desktop, Adobe CC…) without having brew at all.

I.e. it “steals” those brew cask formula and automatically repackage them as nix packages.

A closely related usage would be macOS with nix with nix-darwin, and using nix-darwin config to includes brew casks. This way, nix-darwin assumes brew exists and uses brew to install those casks.

This does have a major distinction on where the applications actually located, where some applications would upset if it is not inside /Applications.