Brew-nix: a flake automatically packaging all homebrew casks

Hi everyone, i made an experimental nix flake to automatically package all brew casks for nix. It probably won’t work with all casks but it has the benefit of being a fully nix expression compared to nix-darwin’s homebrew module where you just specify the name (and it uses homebrew to install it), feel free to try it out :slight_smile:

20 Likes

but it still needs brew?

Nope, no brew required!

4 Likes

It is a “brew parser”, then?

You could call it that I guess

This is great! I use Homebrew exclusively on macOS and nearly exclusively for ‘casks’. And I’ve been experiencing quite some pain lately with it. :-\

2 Likes

Awesome idea! Thanks for making this!

Is nix still symlinking apps to ~/Applications? It’s the one reason I’m still using homebrew, because symlinking seems to not work with spotlight

1 Like

Fuck yes. I’m so stoked for this.

1 Like

On my system with home-manager it seems to get linked to ~Applications/Home Manager Apps/

There’s been no resolution to the symlinking issue. I use a script that copies the apps into place. Others are creating aliases, stub apps, or using some other approach. They all have trade-offs, so no particular one is an ideal solution.

3 Likes

Thx for this project, it’s really helpful for me.

I was wondering if you have a strategy to “fix” the broken package.
For the missing hash, I wonder if you want to maintain in your repository some file that would complete the already existing packages, if not, i wonder if we can add something to add attach a local json file with missing hash needed, or other.

For the path problem, I still have to understand why it doesn’t work and if we can do something to allow fixing of this ( and same question, do you want to maintain something to propose complete package or do you want to just add a simple way to override the problems )

If I can help, don’t hesitate to reach out.

1 Like

Pretty sure just overriding the package and providing the hash yourself is the best since these hashes will constantly update with each update. Not sure how doing this automatically would work as well, seems rather costly as somebody would have to download all the files with no hashes.

As i understand this is more to do with nix (and nix-darwin?) rather than brew-nix, so this could presumably be made less buggy with nix darwin team’s help. I don’t know this in depth enough to know what the actual problem is.

It looks my nixcasks project was “ahead of its time” :rofl:

As there are obviously more users here, I’d like - if you’re interested - to contribute several features I have already implemented to your project and deprecate the mine. No need to duplicate efforts, and you seem to have more energy to maintain the project anyway :slight_smile:

3 Likes