homebrew-core/Formula/nqp.rb

23 lines
676 B
Ruby
Raw Normal View History

2018-12-04 17:52:04 +00:00
class Nqp < Formula
desc "Lightweight Perl 6-like environment for virtual machines"
homepage "https://github.com/perl6/nqp"
url "https://rakudo.perl6.org/downloads/nqp/nqp-2018.12.tar.gz"
sha256 "219db519ad5c1848e4528a56a506dd74b0839ca1d910788411f3bfedf5045d36"
depends_on "moarvm"
def install
system "perl", "Configure.pl",
"--backends=moar",
"--prefix=#{prefix}",
"--with-moar=#{Formula["moarvm"].bin}/moar"
system "make"
system "make", "install"
end
test do
out = shell_output("#{bin}/nqp -e 'for (0,1,2,3,4,5,6,7,8,9) { print($_) }'")
assert_equal "0123456789", out
end
end