class Ipfs < Formula desc "Peer-to-peer hypermedia protocol" homepage "https://ipfs.io/" url "https://github.com/ipfs/go-ipfs.git", :tag => "v0.4.22", :revision => "4e981576b71665f2a9ba71fbf479204802a03a37" head "https://github.com/ipfs/go-ipfs.git" bottle do cellar :any_skip_relocation sha256 "b855c4ffc4c1261fb1a33960498f87ec4d17a6f48262a60fb6983311e8e3e87c" => :mojave sha256 "0e20eda5b040aa8ce134d95284e16cd8913438046321a867908372dfa8941350" => :high_sierra sha256 "16a0b8ca56ea1b6e90f2d489c298075c34bffabed60b14cb2d7c31d0e492a1b3" => :sierra end depends_on "go" => :build def install ENV["GOPATH"] = buildpath (buildpath/"src/github.com/ipfs/go-ipfs").install buildpath.children cd("src/github.com/ipfs/go-ipfs") { system "make", "install" } bin.install "bin/ipfs" end plist_options :manual => "ipfs daemon" def plist; <<~EOS Label #{plist_name} ProgramArguments #{opt_bin}/ipfs daemon RunAtLoad EOS end test do assert_match "initializing IPFS node", shell_output(bin/"ipfs init") end end