2020-01-03 11:32:47 +00:00
|
|
|
class Yaegi < Formula
|
|
|
|
desc "Yet another elegant Go interpreter"
|
|
|
|
homepage "https://github.com/containous/yaegi"
|
2020-01-11 16:48:50 +00:00
|
|
|
url "https://github.com/containous/yaegi/archive/v0.7.4.tar.gz"
|
|
|
|
sha256 "0b10e5f0c8cca585b98fb34476bcfd17c774fc5513cc2e45d2e9b1801a929fb0"
|
2020-01-03 11:32:47 +00:00
|
|
|
head "https://github.com/containous/yaegi.git"
|
|
|
|
|
2020-01-06 14:06:29 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2020-01-11 17:57:13 +00:00
|
|
|
sha256 "0fcf640f00765af2f50edd5daeba066df12378b3452b77ced69f2e9de2cf1e9c" => :catalina
|
|
|
|
sha256 "b360e06c0efc24ecc1f0fe9232fc8f619258ede9db245b07052d5e978d152440" => :mojave
|
|
|
|
sha256 "c7ec7d5fc93ba1dca9de508ecd4b616b0b5ca6f3015ab8813ff5f2c0987e1138" => :high_sierra
|
2020-01-06 14:06:29 +00:00
|
|
|
end
|
|
|
|
|
2020-01-03 11:32:47 +00:00
|
|
|
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
|