2016-09-08 18:02:47 +00:00
|
|
|
require "language/go"
|
|
|
|
|
|
|
|
class Micro < Formula
|
|
|
|
desc "Modern and intuitive terminal-based text editor"
|
|
|
|
homepage "https://github.com/zyedidia/micro"
|
|
|
|
url "https://github.com/zyedidia/micro.git",
|
2016-12-06 16:29:58 +00:00
|
|
|
:tag => "v1.1.3",
|
|
|
|
:revision => "67ac3f1a244913273ece41fe78208de635c1d6db"
|
2016-09-08 18:02:47 +00:00
|
|
|
head "https://github.com/zyedidia/micro.git"
|
|
|
|
|
2016-09-09 14:54:22 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2016-12-06 16:42:37 +00:00
|
|
|
sha256 "5e02a361c25d9f9943de34bd780131040829f5f36dd0ee80293cd838355ec57b" => :sierra
|
|
|
|
sha256 "0fb1e8ec17e28deaf789edc81bf28cd6c98453109403169b24926dc5cec91015" => :el_capitan
|
|
|
|
sha256 "420018246f2c71f7366b5a651dfe3c46bde1348d93894d38638deaac23da7cbb" => :yosemite
|
2016-09-09 14:54:22 +00:00
|
|
|
end
|
|
|
|
|
2016-09-08 18:02:47 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
2016-10-07 01:27:23 +00:00
|
|
|
go_resource "github.com/blang/semver" do
|
|
|
|
url "https://github.com/blang/semver.git",
|
2016-12-06 16:29:58 +00:00
|
|
|
:revision => "3a37c301dda64cbe17f16f661b4c976803c0e2d2"
|
2016-10-07 01:27:23 +00:00
|
|
|
end
|
|
|
|
|
2016-09-08 18:02:47 +00:00
|
|
|
go_resource "github.com/gdamore/encoding" do
|
|
|
|
url "https://github.com/gdamore/encoding.git",
|
2016-09-24 15:45:48 +00:00
|
|
|
:revision => "b23993cbb6353f0e6aa98d0ee318a34728f628b9"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/go-errors/errors" do
|
|
|
|
url "https://github.com/go-errors/errors.git",
|
2016-12-06 16:29:58 +00:00
|
|
|
:revision => "8fa88b06e5974e97fbf9899a7f86a344bfd1f105"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/layeh/gopher-luar" do
|
|
|
|
url "https://github.com/layeh/gopher-luar.git",
|
2016-12-06 16:29:58 +00:00
|
|
|
:revision => "8d335db8d052b4757fc8891f2b27b4d6ee4a7b97"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/lucasb-eyer/go-colorful" do
|
|
|
|
url "https://github.com/lucasb-eyer/go-colorful.git",
|
2016-09-24 15:45:48 +00:00
|
|
|
:revision => "9c2852a141bf4711e4276f8f119c90d0f20a556c"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/mattn/go-isatty" do
|
|
|
|
url "https://github.com/mattn/go-isatty.git",
|
2016-12-06 16:29:58 +00:00
|
|
|
:revision => "30a891c33c7cde7b02a981314b4228ec99380cca"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/mattn/go-runewidth" do
|
|
|
|
url "https://github.com/mattn/go-runewidth.git",
|
2016-10-24 00:25:03 +00:00
|
|
|
:revision => "737072b4e32b7a5018b4a7125da8d12de90e8045"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/mitchellh/go-homedir" do
|
|
|
|
url "https://github.com/mitchellh/go-homedir.git",
|
2016-12-06 16:29:58 +00:00
|
|
|
:revision => "b8bc1bf767474819792c23f32d8286a45736f1c6"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/sergi/go-diff" do
|
|
|
|
url "https://github.com/sergi/go-diff.git",
|
2016-12-06 16:29:58 +00:00
|
|
|
:revision => "83532ca1c1caa393179c677b6facf48e61f4ca5d"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/yuin/gopher-lua" do
|
|
|
|
url "https://github.com/yuin/gopher-lua.git",
|
2016-12-06 16:29:58 +00:00
|
|
|
:revision => "7692488a1ad6bd06dc48890f4a149b65a86a767d"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/zyedidia/clipboard" do
|
|
|
|
url "https://github.com/zyedidia/clipboard.git",
|
2016-10-24 00:25:03 +00:00
|
|
|
:revision => "7b4ccc9435f89956bfa9466c3c42717df272e3bd"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/zyedidia/glob" do
|
|
|
|
url "https://github.com/zyedidia/glob.git",
|
2016-09-24 15:45:48 +00:00
|
|
|
:revision => "7cf5a078d22fc41b27fbda73685c88a3f2c6fe28"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
2016-10-07 01:27:23 +00:00
|
|
|
go_resource "github.com/zyedidia/json5" do
|
|
|
|
url "https://github.com/zyedidia/json5.git",
|
|
|
|
:revision => "2518f8beebde6814f2d30d566260480d2ded2f76"
|
|
|
|
end
|
|
|
|
|
2016-09-08 18:02:47 +00:00
|
|
|
go_resource "github.com/zyedidia/tcell" do
|
|
|
|
url "https://github.com/zyedidia/tcell.git",
|
2016-10-24 00:25:03 +00:00
|
|
|
:revision => "f03d5b8b2730cb2578c427d120a5692ca54fb67b"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "golang.org/x/text" do
|
|
|
|
url "https://go.googlesource.com/text.git",
|
2016-12-06 16:29:58 +00:00
|
|
|
:revision => "5c6cf4f9a2357d38515014cea8c488ed22bdab90"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
mkdir_p buildpath/"src/github.com/zyedidia"
|
|
|
|
ln_s buildpath, buildpath/"src/github.com/zyedidia/micro"
|
|
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
2016-10-24 00:25:03 +00:00
|
|
|
system "make", "build"
|
|
|
|
bin.install "micro"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
assert_match version.to_s, shell_output("#{bin}/micro -version")
|
|
|
|
end
|
|
|
|
end
|