homebrew-core/Formula/idris.rb

31 lines
781 B
Ruby
Raw Normal View History

2014-11-04 20:11:27 +00:00
require "formula"
require "language/haskell"
class Idris < Formula
include Language::Haskell::Cabal
homepage "http://www.idris-lang.org"
url "https://github.com/idris-lang/Idris-dev/archive/v0.9.15.1.tar.gz"
sha1 "064608a43f8544b2c15cefde9e6a22a83ebea904"
head "https://github.com/idris-lang/Idris-dev.git"
depends_on "ghc" => :build
depends_on "cabal-install" => :build
depends_on "gmp"
def install
install_cabal_package
end
test do
(testpath/"hello.idr").write <<-EOS.undent
module Main
main : IO ()
main = putStrLn "Hello, Homebrew!"
EOS
shell_output "#{bin/"idris"} #{testpath/"hello.idr"} -o #{testpath/"hello"}"
result = shell_output "#{testpath/"hello"}"
assert_match /Hello, Homebrew!/, result
end
end