2015-12-22 22:49:47 +00:00
|
|
|
require "language/haskell"
|
|
|
|
|
2015-11-08 16:08:16 +00:00
|
|
|
class Arx < Formula
|
2015-12-22 22:49:47 +00:00
|
|
|
include Language::Haskell::Cabal
|
|
|
|
|
2015-11-08 16:08:16 +00:00
|
|
|
desc "Bundles files and programs for easy transfer and repeatable execution"
|
|
|
|
homepage "https://github.com/solidsnack/arx"
|
|
|
|
url "https://github.com/solidsnack/arx/archive/0.2.1.tar.gz"
|
|
|
|
sha256 "c3e91e4b9f72353061b0a104ee752da88770d695ef6329eca0f1049a56e9c110"
|
|
|
|
|
2015-11-24 13:34:55 +00:00
|
|
|
bottle do
|
|
|
|
sha256 "5f872b7d40a3c6dd1ea8fd3ee24296e7758c4693d62a2dbc07612688ab55c4a5" => :el_capitan
|
|
|
|
sha256 "2711faa378132775c5e152d6649a31d6a758006f1fb4fdd60d968466c7a3afee" => :yosemite
|
|
|
|
sha256 "acb50b98723382ab596b4e83aeb1ad3a8a3ad69648244bd3178425bc3a2ecebb" => :mavericks
|
|
|
|
end
|
|
|
|
|
2015-11-08 16:08:16 +00:00
|
|
|
depends_on "ghc" => :build
|
|
|
|
depends_on "cabal-install" => :build
|
|
|
|
|
|
|
|
def install
|
2015-12-22 22:49:47 +00:00
|
|
|
cabal_sandbox do
|
|
|
|
cabal_install "--only-dependencies"
|
|
|
|
|
|
|
|
system "make"
|
2015-11-08 16:08:16 +00:00
|
|
|
|
2015-12-22 22:49:47 +00:00
|
|
|
tag = `./bin/dist tag`.chomp
|
|
|
|
bin.install "tmp/dist/arx-#{tag}/arx" => "arx"
|
|
|
|
end
|
2015-11-08 16:08:16 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
testscript = (testpath/"testing.sh")
|
|
|
|
|
|
|
|
testscript.write shell_output("#{bin}/arx tmpx // echo 'testing'")
|
|
|
|
testscript.chmod 0555
|
|
|
|
|
|
|
|
assert_match /testing/, shell_output("./testing.sh")
|
|
|
|
end
|
|
|
|
end
|