Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax for a Homebrew formula depending on a cask

I'm writing a homebrew formula for a project (https://www.cryfs.org). Since it is a file system, it depends on osxfuse, which is unfortunately only available as a cask. That is, the formula should have the cask as a dependency.

I tried the following

depends_on :cask => "osxfuse"

but I got the error message

Unsupported special dependency :cask

What is the syntax for adding casks as dependencies to a formula?

like image 990
Heinzi Avatar asked Feb 17 '16 16:02

Heinzi


People also ask

What is brew formulae and cask?

Homebrew-Cask is an extension to Homebrew to install GUI applications such as Google Chrome or Atom. It started independently but its maintainers now work closely with Homebrew's core team. Homebrew calls its package definition files “formulae” (British plural for “formula”). Homebrew-Cask calls them “casks”.

What is cask formula?

CASK – Cost of Available Seat Kilometer is used to measure the unit cost expressed in cash value to operate each seat for every kilometre. The lower the CASK value would mean that it's easier to earn revenue. To get the CASK, direct operational cost is divided by the available seat per kilometre.

What is a Homebrew formula?

Homebrew Formulae is an online package browser for Homebrew – the macOS (and Linux) package manager. For more information on how to install and use Homebrew see our homepage.

What is cask option Homebrew?

Homebrew-Cask extends Homebrew and allows you to install large binary files via a command-line tool. You can for example install applications like Google Chrome, Dropbox, VLC and Spectacle. No more downloading . dmg files and dragging them to your Applications folder!


1 Answers

Couldn't find an answer to this problem either.

But as a poor mans workaround this serves well for the time being:

def install
  # Resolve cask dependencies
  system "/usr/local/bin/brew", "cask", "install", "osxfuse"

The big disadvantage is obvious, its not a so much of dependency relation than an installation command. Which may lead to problems until you actually install the package.

like image 120
Fabian Dörk Avatar answered Sep 19 '22 16:09

Fabian Dörk