Skip to content

Commit

Permalink
skylighting: workaround to build with GHC 9.12
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m committed Jan 7, 2025
1 parent 8590a1b commit 487bc06
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Formula/s/skylighting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@ class Skylighting < Formula
uses_from_macos "zlib"

def install
# Workaround to build with GHC 9.12, remove after https://github.com/haskell/aeson/pull/1126
args = ["--allow-newer=aeson:ghc-prim,aeson:template-haskell"]

system "cabal", "v2-update"

# moving this file aside during the first package's compilation avoids
# spurious errors about undeclared autogenerated modules
mv buildpath/"skylighting/skylighting.cabal", buildpath/"skylighting.cabal.temp-loc"
system "cabal", "v2-install", buildpath/"skylighting-core", "-fexecutable", *std_cabal_v2_args
system "cabal", "v2-install", buildpath/"skylighting-core", "-fexecutable", *args, *std_cabal_v2_args
mv buildpath/"skylighting.cabal.temp-loc", buildpath/"skylighting/skylighting.cabal"

cd "skylighting" do
system bin/"skylighting-extract", buildpath/"skylighting-core/xml"
end
system "cabal", "v2-install", buildpath/"skylighting", "-fexecutable", *std_cabal_v2_args
system "cabal", "v2-install", buildpath/"skylighting", "-fexecutable", *args, *std_cabal_v2_args
end

test do
Expand Down

0 comments on commit 487bc06

Please sign in to comment.