require 'formula' class Clipper < Formula homepage 'https://wincent.com/products/clipper' url 'https://github.com/wincent/clipper/archive/0.1.zip' sha1 'c0659968bf4ed4c6ac2e01c6608f55d5e22f96c3' depends_on 'go' => :build def install ENV['GOPATH'] = buildpath system 'go', 'build', 'clipper.go' bin.install 'clipper' end plist_options :manual => 'clipper' def plist; <<-EOS.undent Label #{plist_name} RunAtLoad KeepAlive WorkingDirectory #{HOMEBREW_PREFIX} ProgramArguments #{opt_prefix}/bin/clipper --address 127.0.0.1 --port 8377 EOS end end