19 lines
568 B
Ruby
19 lines
568 B
Ruby
|
class Yaegi < Formula
|
||
|
desc "Yet another elegant Go interpreter"
|
||
|
homepage "https://github.com/containous/yaegi"
|
||
|
url "https://github.com/containous/yaegi/archive/v0.7.2.tar.gz"
|
||
|
sha256 "1f2e63290614e26ffb82ef16af23d0ce5237c10a19a5c1191c22398adb62bc1e"
|
||
|
head "https://github.com/containous/yaegi.git"
|
||
|
|
||
|
depends_on "go" => :build
|
||
|
|
||
|
def install
|
||
|
system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"yaegi", "cmd/yaegi/yaegi.go"
|
||
|
prefix.install_metafiles
|
||
|
end
|
||
|
|
||
|
test do
|
||
|
assert_match "4", pipe_output("#{bin}/yaegi", "3 + 1", 0)
|
||
|
end
|
||
|
end
|