homebrew-core/Formula/gx-go.rb
2016-10-12 02:14:39 -07:00

104 lines
3.5 KiB
Ruby

require "language/go"
class GxGo < Formula
desc "Tool to use with the gx package manager for packages written in go."
homepage "https://github.com/whyrusleeping/gx-go"
url "https://github.com/whyrusleeping/gx-go/archive/v1.4.0.tar.gz"
sha256 "d7c217cbef3e5d1b2c7fa69d2ff6729e12db396ef839704d5c86969a6e863272"
head "https://github.com/whyrusleeping/gx-go.git"
bottle do
sha256 "136e707e21e4b1e969eb2b6b43188d5bd887fca77683c4ad88a81dd29c6b65ed" => :sierra
sha256 "3a7fe9c10b04b49ccd8d8545e38c125ec14b1e2b270fbe05452eabddbe3a8240" => :el_capitan
sha256 "e0be79f60c0f358ef312bb827c2eee0563fad60bed3eac82dcee4b2a57b3aff7" => :yosemite
end
depends_on "go" => :build
go_resource "github.com/codegangsta/cli" do
url "https://github.com/codegangsta/cli.git",
:revision => "55f715e28c46073d0e217e2ce8eb46b0b45e3db6"
end
go_resource "github.com/ipfs/go-ipfs-api" do
url "https://github.com/ipfs/go-ipfs-api.git",
:revision => "0ee867280b9b85f2fcd6a3aa324728fc775dae48"
end
go_resource "github.com/jbenet/go-base58" do
url "https://github.com/jbenet/go-base58.git",
:revision => "6237cf65f3a6f7111cd8a42be3590df99a66bc7d"
end
go_resource "github.com/jbenet/go-os-rename" do
url "https://github.com/jbenet/go-os-rename.git",
:revision => "3ac97f61ef67a6b87b95c1282f6c317ed0e693c2"
end
go_resource "github.com/kr/fs" do
url "https://github.com/kr/fs.git",
:revision => "2788f0dbd16903de03cb8186e5c7d97b69ad387b"
end
go_resource "github.com/mitchellh/go-homedir" do
url "https://github.com/mitchellh/go-homedir.git",
:revision => "756f7b183b7ab78acdbbee5c7f392838ed459dda"
end
go_resource "github.com/multiformats/go-multiaddr" do
url "https://github.com/multiformats/go-multiaddr.git",
:revision => "0de18dfd8007f3c2508a5635e5b1f1aec8231dfa"
end
go_resource "github.com/multiformats/go-multiaddr-net" do
url "https://github.com/multiformats/go-multiaddr-net.git",
:revision => "08107ee53b70f1516800744a64a25c248de68963"
end
go_resource "github.com/multiformats/go-multihash" do
url "https://github.com/multiformats/go-multihash.git",
:revision => "cb7bd6c14af4c504c8c486c36f5accd29ca1c30d"
end
go_resource "github.com/sabhiram/go-git-ignore" do
url "https://github.com/sabhiram/go-git-ignore.git",
:revision => "228fcfa2a06e870a3ef238d54c45ea847f492a37"
end
go_resource "github.com/whyrusleeping/go-multipart-files" do
url "https://github.com/whyrusleeping/go-multipart-files.git",
:revision => "3be93d9f6b618f2b8564bfb1d22f1e744eabbae2"
end
go_resource "github.com/whyrusleeping/gx" do
url "https://github.com/whyrusleeping/gx.git",
:revision => "1c51b785eb40b3c2723dcae51e7aab3b8f9a2ebb"
end
go_resource "github.com/whyrusleeping/stump" do
url "https://github.com/whyrusleeping/stump.git",
:revision => "206f8f13aae1697a6fc1f4a55799faf955971fc5"
end
go_resource "github.com/whyrusleeping/tar-utils" do
url "https://github.com/whyrusleeping/tar-utils.git",
:revision => "beab27159606f5a7c978268dd1c3b12a0f1de8a7"
end
go_resource "golang.org/x/crypto" do
url "https://go.googlesource.com/crypto.git",
:revision => "4cd25d65a015cc83d41bf3454e6e8d6c116d16da"
end
def install
ENV["GOPATH"] = buildpath
mkdir_p "src/github.com/whyrusleeping"
ln_s buildpath, "src/github.com/whyrusleeping/gx-go"
Language::Go.stage_deps resources, buildpath/"src"
system "go", "build", "-o", bin/"gx-go"
end
test do
system bin/"gx-go", "help"
end
end