diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2023-11-15 13:35:50 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2023-11-15 18:03:02 +0200 |
commit | 59fdbbb7171f0370c0ef089bccea81db320cd27c (patch) | |
tree | bf3b9cf0cb2ada241fd91ca25f2de5535fb5ae51 /gnu/packages/patches | |
parent | 879503464f26fed14570f42b8f040ea7484b72ea (diff) | |
download | guix-59fdbbb7171f0370c0ef089bccea81db320cd27c.tar.gz guix-59fdbbb7171f0370c0ef089bccea81db320cd27c.zip |
gnu: ghc-persistent: Fix build on i686-linux.
* gnu/packages/haskell-xyz.scm (ghc-persistent)[source]: Add patch.
* gnu/packages/patches/ghc-persistent-fix-32bit.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Change-Id: I1b2c8419f3136d6c9df772d7c7abdc83a80d6112
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/ghc-persistent-fix-32bit.patch | 25 |
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" + |