Add Linux support to existing cask

Hey all :wave:. I’m converting to Fedora 30 on my work laptop, and I’ve been an avid homebrew user for years on macOS. I think it’s an opportunity to learn and contribute to the project.

Q: How do I add Linux installation instructions to an existing cask? For instance, I went to install Tusk, and got the error:

$ brew cask install tusk
Error: Installing casks is supported only on macOS

I couldn’t quite find a tutorial on adjusting the cask, so I’m wondering what to do here. From what I can tell, I would add the sha of the Linux release of Tusk, but I’m guessing I’d have to add some installation logic here in the cask.

Could anyone point me toward an example or walk me through it a bit? I’m happy to open the PR once I get the syntax and testing understood. Thanks!

There is no support for casks for linux. You’d have to write the handling of them yourself and make a PR for that.

Also, we will probably not accept any direct change to a formula or the code regarding that matter.

If you want to work on cask support for Linux, this should be started as a fork of this project, to showcase the way it works. If the community around this new project is big enough we will merge the changes back to Homebrew.

But right now almost everything needs to be setup from scratch.

Okay that’s helpful context. So if there’s a tool I like for Linux that is currently available in a cask only, is there a simpler path to getting it into the brew project than extending the cask system? If not, no worries - I want to make sure I’m following what you’re saying.

There is not, unless it’s a cli that builds from source and is therefore eligible to be a formula.

You can create a third party tap and create a formula for the tool. See for instructions.

That’s exactly the situation. I’ll look into that next. Cheers all :beer: