Skip to content

Conversation

@daegalus
Copy link

@daegalus daegalus commented Sep 15, 2025

Important: Do not tick a checkbox if you haven’t performed its action. Honesty is indispensable for a smooth review process.

In the following questions <cask> is the token of the cask you're submitting.

After making any changes to a cask, existing or new, verify:

Additionally, if adding a new cask: (since linux support is new, I tested this also)

  • HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <cask> worked successfully.
  • brew uninstall --cask <cask> worked successfully.

I wanted to add Linux support to this cask. It can be quite useful for Immutable systems and other linux usecases that can't use the DEB/RPM route.

I am new to making homebrew recipes and cask, and I am sure I have made many mistakes, so I would appreciate any feedback.

I am particularly concerned if it is ok to even use the if os == code, or if there is a better way to organize the file, as I am also concerned about the order of directives. Maybe I do a bit more duplication and put more stuff in on_linux and move the macos stuff to on_macos?

Also I don't know if there is a variable or function i can use to get /home/linuxbrew/.linuxbrew/Caskroom/<cask> as a path, instead of hardcoding it.

I also had to use some methods to handle the difference in naming for linux and macos on the VSCode URLs. For macos it is darwin and darwin-arm64 while linux is linux-x64 and linux-arm64

The Cask cookbook docs were a little incorrect, as it instructed me to put the module Utils inside the cask block, and used self. methods, while the stylecheck changed things up. Let me know if there is a different way to do this.

EDIT: I forgot to ask, is there a way to add one-off files that are not part of the package? There are 2 .desktop files I need to add to ~/.local/share/application so that this app shows up in the Launchers in linux, but they are not included in the tar.gz file option on the vscode download, only in the rpm and deb. Or a way to download extra files?

EDIT2: I also don't have a mac to test the mac side of things.

@bevanjkay
Copy link
Member

Thanks for the work here so far @daegalus but we don't currently support Casks on Linux apart from simple binary packages. There is some preliminary work to enable the use of AppImages in future Homebrew/brew#20334

@daegalus
Copy link
Author

Thanks for the work here so far @daegalus but we don't currently support Casks on Linux apart from simple binary packages. There is some preliminary work to enable the use of AppImages in future Homebrew/brew#20334

Well, i have it working locally. And i figured i could use post install with File to write the desktop files to the right place.

I plan to add Flatpak support in the future to honebrew. Im just learning by writing done Casks first.

I think the current state can support most UI Linux apps actually

@bevanjkay
Copy link
Member

bevanjkay commented Sep 15, 2025

You're welcome to host a version with your working code in a local tap for now, but we'd need to have these kind of changes supported in https://github.com/homebrew/brew before we'd consider adding them to specific casks.

@daegalus
Copy link
Author

You're welcome to host a version with your working code in a local tap for now, but we'd need to have these kind of changes supported in https://github.com/homebrew/brew before we'd consider adding them to specific casks.

Ok, Ill start my own tap for these and slowly add the necessary functionality to brew, so we can eventually merge these mainline.

@p-linnane
Copy link
Member

Thanks @daegalus! Looking forward to your contributions 😄. Closing this out for now.

@p-linnane p-linnane closed this Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants