Skip to content

Commit

Permalink
add tinygo 0.26
Browse files Browse the repository at this point in the history
  • Loading branch information
tedmielczarek-fastly committed Apr 13, 2023
1 parent fb8761a commit cd0578c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Formula/tinygo.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
class Tinygo < Formula
desc "TinyGo is a Go compiler for small places. Microcontrollers, WebAssembly, and command-line tools. Based on LLVM."
homepage "https://tinygo.org/"
version "0.26.0"

depends_on "binaryen"

if OS.mac?
url "https://github.com/tinygo-org/tinygo/releases/download/v#{version}/tinygo#{version}.darwin-amd64.tar.gz"
sha256 "1fcef807fd60dd93346c4bb94aa41b3f174b3fac223d692d148289a6fa70adc5"
elsif OS.linux?
url "https://github.com/tinygo-org/tinygo/releases/download/v#{version}/tinygo#{version}.linux-amd64.tar.gz"
sha256 "e7264b6f9b71d4caeee0c2f374c454e90e7b620aff6ab6fd5a938fb9d296b287"
end

def install
libexec.install "bin/tinygo"
(bin/"tinygo").write_env_script libexec/"tinygo",
:TINYGOROOT => prefix
lib.install Dir["lib/*"]
prefix.install "src"
prefix.install "targets"
end

test do
system "#{bin}/tinygo", "version"
end
end

0 comments on commit cd0578c

Please sign in to comment.