aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/ghc-persistent-fix-32bit.patch
diff options
context:
space:
mode:
authorJohn Kehayias <john.kehayias@protonmail.com>2023-11-27 23:50:25 -0500
committerJohn Kehayias <john.kehayias@protonmail.com>2023-11-27 23:50:25 -0500
commit79765b40fd9b4921b531284c589ace8a2c89a6ea (patch)
tree56bc0ea88d303e72514c2c085082029c12d2a617 /gnu/packages/patches/ghc-persistent-fix-32bit.patch
parent2410a30f6c06d56b5589e0ad685bcdf09bb144bf (diff)
parentf5493629e2650c0d30caf0f01f76b2383f78b9de (diff)
downloadguix-79765b40fd9b4921b531284c589ace8a2c89a6ea.tar.gz
guix-79765b40fd9b4921b531284c589ace8a2c89a6ea.zip
Merge branch 'mesa-updates'
Change-Id: I31c26c11dd3a7838a1f70ceb250e54a1574eb580
Diffstat (limited to 'gnu/packages/patches/ghc-persistent-fix-32bit.patch')
-rw-r--r--gnu/packages/patches/ghc-persistent-fix-32bit.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/packages/patches/ghc-persistent-fix-32bit.patch b/gnu/packages/patches/ghc-persistent-fix-32bit.patch
new file mode 100644
index 0000000000..d0aace2445
--- /dev/null
+++ b/gnu/packages/patches/ghc-persistent-fix-32bit.patch
@@ -0,0 +1,25 @@
+https://sources.debian.org/data/main/h/haskell-persistent/2.13.3.5-2/debian/patches/fix-tests-32-bit
+Inspired by: https://github.com/yesodweb/persistent/pull/1429
+
+--- a/test/Database/Persist/THSpec.hs
++++ b/test/Database/Persist/THSpec.hs
+@@ -25,6 +25,7 @@ module Database.Persist.THSpec where
+
+ import Control.Applicative (Const(..))
+ import Data.Aeson (decode, encode)
++import Data.Bits (bitSizeMaybe)
+ import Data.ByteString.Lazy.Char8 ()
+ import Data.Coerce
+ import Data.Functor.Identity (Identity(..))
+@@ -237,7 +238,10 @@ spec = describe "THSpec" $ do
+ it "should have usual haskell name" $ do
+ fieldHaskell `shouldBe` FieldNameHS "Id"
+ it "should have correct underlying sql type" $ do
+- fieldSqlType `shouldBe` SqlInt64
++ fieldSqlType `shouldBe`
++ if bitSizeMaybe (0 :: Int) <= Just 32
++ then SqlInt32
++ else SqlInt64
+ it "should have correct haskell type" $ do
+ fieldType `shouldBe` FTTypeCon Nothing "Int"
+