Skip to content

Commit

Permalink
elm: add patch to build on cabal-install-3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fishtreesugar authored and SeekingMeaning committed Dec 22, 2020
1 parent 2fba5bd commit 68a2180
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Formula/elm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ class Elm < Formula
uses_from_macos "ncurses"
uses_from_macos "zlib"

def install
# elm-compiler needs to be staged in a subdirectory for the build process to succeed
(buildpath/"elm-compiler").install Dir["*"]
patch do
# elm's tarball is not a proper cabal tarball, it contains multiple cabal files.
# Add `cabal.project` lets cabal-install treat this tarball as cabal project correctly.
# https://github.com/elm/compiler/pull/2159
url "https://github.com/elm/compiler/commit/eb566e901a419a6620e43c18faf89f57f0827124.patch?full_index=1"
sha256 "556ff15fb4d8e5ca6e853280e35389c8875fa31a543204b315b55ec2ac967624"
end

def install
system "cabal", "v2-update"
system "cabal", "v2-install", *std_cabal_v2_args
end
Expand Down

0 comments on commit 68a2180

Please sign in to comment.