Recommended Installation Methods Under Darwin

Hello,
It seems we are spoiled for choice as to installation methods, especially under darwin. I have a question regarding the brew install caddy option. @matt does not seem to be one of the maintainers of the Homebrew formula (https://github.com/Homebrew/homebrew-core/blob/master/Formula/caddy.rb), and nowhere on the Caddy site do I see any mention of the Homebrew option. Homebrew is generally a convenient choice for darwin users, but I wonder if it is not mentioned because the middleware granularity can’t be specified, or if there are other good reasons to choose one of the documented methods.

Thanks much in advance. I am about to begin using Caddy and wish to “start on the right foot.”

1 Like

You’re right, the Homebrew formula was community-contributed. I’m thankful for that, but I also do not know who has the reins in maintaining it and updating it when new Caddy versions are released.

I don’t really know how Homebrew formulae work; can they allow the user to customize how Caddy is built? Does it require Go to be installed?

It appears to build it on the user machine, but it looks like there is no way to use plugins with it.

I would start with a golang install. go get -u github.com/mholt/caddy

Anything else would make you a consumer? :wink:

I don’t think so either. But maybe it could be possible by changing something on the formula ? It would be helpful !

So it turns out that brew install <package> [--option][--option][--etc] is possible, but is a somewhat more involved scripting exercise.

For example, compare the Caddy formula with the Vim formula, which provides the following:

$ brew info vim
vim: stable 7.4.1847, HEAD
Vi "workalike" with many additional features
http://www.vim.org/
Conflicts with: ex-vi
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/vim.rb
==> Dependencies
Optional: lua ✘, luajit ✘
==> Options
--with-client-server
	Enable client/server mode
--with-lua
	Build vim with lua support
--with-luajit
	Build with luajit support
--with-mzscheme
	Build vim with mzscheme support
--with-override-system-vi
	Override system vi
--with-python3
	Build vim with python3 instead of python[2] support
--with-tcl
	Build vim with tcl support
--without-nls
	Build vim without National Language Support (translated messages, keymaps)
--without-perl
	Build vim without perl support
--without-python
	Build vim without python support
--without-ruby
	Build vim without ruby support
--HEAD
	Install HEAD version
1 Like