Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading