elm: use resource patch

master
ilovezfs 2018-01-22 01:56:04 -08:00
parent 115739944a
commit 1cc53fee2b
1 changed files with 7 additions and 12 deletions

View File

@ -13,6 +13,13 @@ class Elm < Formula
resource "elm-package" do
url "https://github.com/elm-lang/elm-package/archive/0.18.0.tar.gz"
sha256 "5cf6e1ae0a645b426c0474cc7cd3f7d1605ffa1ac5756a39a8b2268ddc7ea0e9"
# Fix two "Not in scope" errors
# Upstream PR from 3 Oct 2017 "Paths.hs: fix build failure"
patch do
url "https://github.com/elm-lang/elm-package/pull/287.patch?full_index=1"
sha256 "3f922d7962a41217e760361ad444d00676aff0e40c3741fd536b39d2961165d3"
end
end
resource "elm-make" do
@ -41,13 +48,6 @@ class Elm < Formula
depends_on "ghc@8.0" => :build
depends_on "cabal-install" => :build
# Fix two "Not in scope" errors
# Upstream PR from 3 Oct 2017 "Paths.hs: fix build failure"
resource "elm-package-patch" do
url "https://github.com/elm-lang/elm-package/pull/287.patch?full_index=1"
sha256 "3f922d7962a41217e760361ad444d00676aff0e40c3741fd536b39d2961165d3"
end
def install
# elm-compiler needs to be staged in a subdirectory for the build process to succeed
(buildpath/"elm-compiler").install Dir["*"]
@ -70,11 +70,6 @@ class Elm < Formula
"HTTP >= 4000.2.5 && < 4000.4," # 4000.3.3 is current
end
resource("elm-package-patch").stage do
system "patch", "-p1", "-i", Pathname.pwd/"287.patch", "-d",
buildpath/"elm-package"
end
cabal_sandbox do
cabal_sandbox_add_source "elm-compiler", *extras
cabal_install "--only-dependencies", "elm-compiler", *extras