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",
|
2017-02-10 16:06:26 +00:00
|
|
|
:tag => "v1.1.4",
|
|
|
|
:revision => "5dc8fe40ca3f2d64ff2574a074ce91b92ba14c9d"
|
2017-01-11 14:19:56 +00:00
|
|
|
head "https://github.com/zyedidia/micro.git", :shallow => false
|
2016-09-08 18:02:47 +00:00
|
|
|
|
2016-09-09 14:54:22 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2017-02-10 16:55:02 +00:00
|
|
|
sha256 "c5bd0f727bfe078b1f315e9c4f9610c38cb02db1c57138dc78d9c0518cfa41e8" => :sierra
|
|
|
|
sha256 "cdfd6c9521de4a47df9cf48c58736e6584892a45729adaf7357f80efe1a78144" => :el_capitan
|
|
|
|
sha256 "db62612120d75b76719592cdb8d7cb961541db1c6d35051a1adfa36f9faeda7a" => :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",
|
2017-02-10 16:06:26 +00:00
|
|
|
:revision => "4a1e882c79dcf4ec00d2e29fac74b9c8938d5052"
|
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/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",
|
2017-02-10 16:06:26 +00:00
|
|
|
:revision => "281032e84ae07510239465db46bf442aa44b953a"
|
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",
|
2017-02-10 16:06:26 +00:00
|
|
|
:revision => "14207d285c6c197daabb5c9793d63e7af9ab2d50"
|
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",
|
2017-02-10 16:06:26 +00:00
|
|
|
:revision => "24e2351369ec4949b2ed0dc5c477afdd4c4034e8"
|
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",
|
2017-02-10 16:06:26 +00:00
|
|
|
:revision => "99a8c34ef9c866b59dc56f3f7b627e457c7690e2"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/zyedidia/clipboard" do
|
|
|
|
url "https://github.com/zyedidia/clipboard.git",
|
2017-02-10 16:06:26 +00:00
|
|
|
:revision => "adacf416cec40266b051e7bc096c52951f2725e9"
|
2016-09-08 18:02:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/zyedidia/glob" do
|
|
|
|
url "https://github.com/zyedidia/glob.git",
|
2017-02-10 16:06:26 +00:00
|
|
|
:revision => "dd4023a66dc351ae26e592d21cd133b5b143f3d8"
|
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
|
|
|
|
|
2017-02-10 16:06:26 +00:00
|
|
|
go_resource "golang.org/x/net" do
|
|
|
|
url "https://go.googlesource.com/net.git",
|
|
|
|
:revision => "a689eb3bc4b53af70390acc3cf68c9f549b6b8d6"
|
|
|
|
end
|
|
|
|
|
2016-09-08 18:02:47 +00:00
|
|
|
go_resource "golang.org/x/text" do
|
|
|
|
url "https://go.googlesource.com/text.git",
|
2017-02-10 16:06:26 +00:00
|
|
|
:revision => "06d6eba81293389cafdff7fca90d75592194b2d9"
|
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "layeh.com/gopher-luar" do
|
|
|
|
url "https://github.com/layeh/gopher-luar.git",
|
|
|
|
:revision => "80196fe2abc5682963fc7a5261f5a5d77509938b"
|
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"
|
2017-02-10 16:06:26 +00:00
|
|
|
system "make", "build-quick"
|
2016-10-24 00:25:03 +00:00
|
|
|
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
|