Skip to content

Commit

Permalink
psc-package: fix build
Browse files Browse the repository at this point in the history
Related to #94212.

Closes #106481.

Signed-off-by: Daniel Nachun <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
  • Loading branch information
triallax authored and BrewTestBot committed Jul 26, 2022
1 parent 5d03ae4 commit 5374698
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion Formula/psc-package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class PscPackage < Formula
url "https://github.com/purescript/psc-package/archive/v0.6.2.tar.gz"
sha256 "96c3bf2c65d381c61eff3d16d600eadd71ac821bbe7db02acec1d8b3b6dbecfc"
license "BSD-3-Clause"
revision 1
revision 2

bottle do
sha256 cellar: :any_skip_relocation, arm64_big_sur: "54f1d5c06e4c59a36e9cd96aa826dce5fce68e13d3cd6572ded1133b90d26fde"
Expand All @@ -25,6 +25,9 @@ class PscPackage < Formula
sha256 "e49585ff8127ccca0b35dc8a7caa04551de1638edfd9ac38e031d1148212091c"
end

# Another patch to fix build. See https://github.com/purescript/psc-package/pull/169.
patch :DATA

def install
system "cabal", "v2-update"
system "cabal", "v2-install", *std_cabal_v2_args
Expand All @@ -38,3 +41,28 @@ def install
assert_match "Install complete", shell_output("#{bin}/psc-package install")
end
end

__END__
diff --git a/app/Types.hs b/app/Types.hs
index e0a6b73..3614dab 100644
--- a/app/Types.hs
+++ b/app/Types.hs
@@ -10,6 +10,7 @@ module Types

import Control.Category ((>>>))
import Data.Aeson (FromJSON, ToJSON, FromJSONKey(..), ToJSONKey(..), ToJSONKeyFunction(..), FromJSONKeyFunction(..), parseJSON, toJSON, withText)
+import Data.Aeson.Types (toJSONKeyText)
import qualified Data.Aeson.Encoding as AesonEncoding
import Data.Char (isAscii, isLower, isDigit)
import Data.Text (Text)
@@ -34,9 +35,7 @@ fromText t =

instance ToJSONKey PackageName where
toJSONKey =
- ToJSONKeyText
- runPackageName
- (AesonEncoding.text . runPackageName)
+ toJSONKeyText runPackageName

instance FromJSONKey PackageName where
fromJSONKey =

0 comments on commit 5374698

Please sign in to comment.