Skip to content

Commit

Permalink
Merge pull request #204230 from Homebrew/mighttpd2-ghc912
Browse files Browse the repository at this point in the history
mighttpd2: workaround to build with GHC 9.12
  • Loading branch information
BrewTestBot authored Jan 14, 2025
2 parents 8e7e749 + df07337 commit 031d211
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Formula/m/mighttpd2.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class Mighttpd2 < Formula
desc "HTTP server"
homepage "https://kazu-yamamoto.github.io/mighttpd2/"
# TODO: Check if `aeson` and `cborg` allow-newer workarounds can be removed
url "https://hackage.haskell.org/package/mighttpd2-4.0.8/mighttpd2-4.0.8.tar.gz"
sha256 "cad7a92e3f9ce636d0099b226e080d0102a2498b9ef9d0abfc6b24e24f1d127b"
license "BSD-3-Clause"
Expand All @@ -20,12 +21,20 @@ class Mighttpd2 < Formula
uses_from_macos "zlib"

def install
# Workaround to build with GHC 9.12, remove after https://github.com/haskell/aeson/pull/1126
# is merged and available on Hackage or if `aeson` is willing to provide a metadata revision
args = ["--allow-newer=aeson:ghc-prim,aeson:template-haskell"]

# Workaround to build with GHC 9.12, remove after https://github.com/well-typed/cborg/pull/339
# is merged and available on Hackage or if `cborg` is willing to provide a metadata revision
args << "--allow-newer=serialise:base,serialise:ghc-prim,cborg:base,cborg:ghc-prim"

system "cabal", "v2-update"
system "cabal", "v2-install", "-ftls", *std_cabal_v2_args
system "cabal", "v2-install", "--flags=tls", *args, *std_cabal_v2_args
end

test do
system bin/"mighty-mkindex"
assert (testpath/"index.html").file?
assert_predicate testpath/"index.html", :file?
end
end

0 comments on commit 031d211

Please sign in to comment.