homebrew-core/Formula/yaegi.rb

26 lines
893 B
Ruby
Raw Permalink Normal View History

class Yaegi < Formula
desc "Yet another elegant Go interpreter"
homepage "https://github.com/containous/yaegi"
url "https://github.com/containous/yaegi/archive/v0.7.4.tar.gz"
sha256 "0b10e5f0c8cca585b98fb34476bcfd17c774fc5513cc2e45d2e9b1801a929fb0"
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
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