homebrew-core/Formula/psc-package.rb

33 lines
1.2 KiB
Ruby

class PscPackage < Formula
desc "Package manager for PureScript based on package sets"
homepage "https://psc-package.readthedocs.io"
url "https://github.com/purescript/psc-package/archive/v0.6.2.tar.gz"
sha256 "96c3bf2c65d381c61eff3d16d600eadd71ac821bbe7db02acec1d8b3b6dbecfc"
license "BSD-3-Clause"
revision 1
bottle do
cellar :any_skip_relocation
sha256 "f5baac6c49a67991b2ed0f2a2ba34898317e9cfd6864e8b446fb159f80ae04ec" => :catalina
sha256 "e6cd795e5eade3414e2149f4fe4d529468293b122659ed5bd8b2b4df716c77cf" => :mojave
sha256 "0b0411dfd516bac15b2e99cba163dbc3c77742eae9e09038ac85ef1793ce767c" => :high_sierra
end
depends_on "cabal-install" => :build
depends_on "ghc@8.6" => :build
depends_on "purescript"
def install
system "cabal", "v2-update"
system "cabal", "v2-install", *std_cabal_v2_args
end
test do
assert_match "Initializing new project in current directory", shell_output("#{bin}/psc-package init --set=master")
package_json = (testpath/"psc-package.json").read
package_hash = JSON.parse(package_json)
assert_match "master", package_hash["set"]
assert_match "Install complete", shell_output("#{bin}/psc-package install")
end
end